test-client-godot/scenes/Game/Box.gd

7 lines
263 B
GDScript3
Raw Normal View History

2018-07-25 14:12:12 +00:00
extends RigidBody
2018-07-26 17:15:50 +00:00
func _on_Box_sleeping_state_changed():
if self.sleeping:
$MeshInstance.get_surface_material(0).albedo_color = Color( 0.0, 1.0, 0.0, 1 )
else:
2018-07-27 07:27:46 +00:00
$MeshInstance.get_surface_material(0).albedo_color = Color( 0.0, 0.0, 1.0, 1 )