Added particles

This commit is contained in:
John Murphy
2017-09-23 22:50:44 -07:00
parent 3a8344d0dc
commit b7ced8fa35
4 changed files with 55 additions and 14 deletions
+3
View File
@@ -9,9 +9,12 @@ func _ready():
func _integrate_forces(state):
if Input.is_action_pressed("thrust"):
set_applied_force(state.get_total_gravity() - thrust.rotated(get_rot()))
get_node("Particles2D").show()
elif Input.is_action_pressed("revthrust"):
set_applied_force(state.get_total_gravity() + thrust.rotated(get_rot()))
get_node("Particles2D").hide()
else:
set_applied_force(state.get_total_gravity() + Vector2())
get_node("Particles2D").hide()
var t = Input.is_action_pressed("bear_right") - Input.is_action_pressed("bear_left")
set_applied_torque(torque * t)