mirror of
https://github.com/jwinterm/MoonLaunch.git
synced 2026-10-22 06:18:37 +02:00
Added particles
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user