supports resources based on masks.
This commit is contained in:
17
ResourcePolygon2D.gd
Normal file
17
ResourcePolygon2D.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
@tool
|
||||
extends Polygon2D
|
||||
class_name ResourcePolygon2D
|
||||
|
||||
@export var points_resource: PolygonPointsResource:
|
||||
set(value):
|
||||
points_resource = value
|
||||
_update_polygon()
|
||||
|
||||
|
||||
func _update_polygon() -> void:
|
||||
if points_resource and points_resource.points.size() > 0:
|
||||
polygon = points_resource.points
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_update_polygon()
|
||||
Reference in New Issue
Block a user