#57 rework des inputs et actions
This commit is contained in:
17
gui/pointer/scripts/action_zone.gd
Normal file
17
gui/pointer/scripts/action_zone.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
extends Sprite2D
|
||||
class_name ActionZone
|
||||
|
||||
const OPACITY = 0.4
|
||||
const ACTIVATED_COLOR = Color.TURQUOISE
|
||||
const DEACTIVATED_COLOR = Color.REBECCA_PURPLE
|
||||
|
||||
|
||||
var radius : int = 0
|
||||
var active : bool = false
|
||||
|
||||
func _draw():
|
||||
draw_circle(
|
||||
Vector2.ZERO,
|
||||
radius,
|
||||
Color((ACTIVATED_COLOR if active else DEACTIVATED_COLOR), OPACITY)
|
||||
)
|
||||
Reference in New Issue
Block a user