khanat-assets---3d-godot-cl.../meshes/props/travel_box/container.gd
2019-05-01 19:36:46 +02:00

14 lines
No EOL
493 B
GDScript

tool
extends Spatial
export( Color ) var color = Color( 1.0, 1.0, 1.0, 1.0 ) setget set_color
func set_color( value ):
color = value
$container_bottom/container_bottom.get_surface_material( 0 ).albedo_color = self.color
$container_lid/container_lid.get_surface_material( 0 ).albedo_color = self.color
export( float ) var lid_angle = 0.0 setget set_lid_angle
func set_lid_angle( value ):
lid_angle = value
$container_lid.rotation_degrees = Vector3( -lid_angle, 0.0, 0.0 )