Add project files
This commit is contained in:
commit
ab339c8a2c
81 changed files with 2567 additions and 0 deletions
20
core/dynamic_polygon.gd
Normal file
20
core/dynamic_polygon.gd
Normal file
|
@ -0,0 +1,20 @@
|
|||
@tool
|
||||
extends CollisionPolygon2D
|
||||
|
||||
@export var color: Color = Color.WHITE:
|
||||
set(v):
|
||||
color = v
|
||||
update_polygon()
|
||||
get():
|
||||
return color
|
||||
|
||||
@export var update: bool:
|
||||
set(v):
|
||||
update_polygon()
|
||||
|
||||
func update_polygon():
|
||||
$Polygon2D.polygon = polygon
|
||||
$Polygon2D.color = color
|
||||
|
||||
func _ready() -> void:
|
||||
update_polygon()
|
Reference in a new issue