blob: a102ab8cfef64cb04dcd9a19f079252f92b7d510 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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)
|