diff options
Diffstat (limited to 'src/addons/rmsmartshape/shapes/shape_render.gd')
-rw-r--r-- | src/addons/rmsmartshape/shapes/shape_render.gd | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/addons/rmsmartshape/shapes/shape_render.gd b/src/addons/rmsmartshape/shapes/shape_render.gd new file mode 100644 index 0000000..a102ab8 --- /dev/null +++ b/src/addons/rmsmartshape/shapes/shape_render.gd @@ -0,0 +1,27 @@ +tool +extends Node2D +class_name SS2D_Shape_Render + +""" +Node is used to render shape geometry +""" + +var mesh = null setget set_mesh + + +func set_mesh(m): + mesh = m + if m != null: + material = mesh.material + z_index = mesh.z_index + z_as_relative = mesh.z_as_relative + else: + material = null + z_index = 0 + z_as_relative = true + update() + + +func _draw(): + if mesh != null: + mesh.render(self) |