test-client-godot/scenes/Game/Box.gd
2018-07-27 09:27:46 +02:00

7 lines
No EOL
263 B
GDScript

extends RigidBody
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:
$MeshInstance.get_surface_material(0).albedo_color = Color( 0.0, 0.0, 1.0, 1 )