sproing
This commit is contained in:
parent
d77ed8a49f
commit
20f35ab240
5 changed files with 33 additions and 19 deletions
|
@ -49,6 +49,11 @@ func kill() -> void:
|
|||
state_chart.send_event(&"killed")
|
||||
|
||||
|
||||
func launch(impulse: Vector2) -> void:
|
||||
velocity = impulse
|
||||
state_chart.send_event(&"launched")
|
||||
|
||||
|
||||
#region Idle
|
||||
func _slow_to_stop(delta: float) -> void:
|
||||
velocity.x = move_toward(velocity.x, 0.0, stopping_force * delta)
|
||||
|
|
|
@ -73,9 +73,9 @@ collision_layer = 16
|
|||
collision_mask = 3
|
||||
floor_snap_length = 3.0
|
||||
script = ExtResource("1_xs4s5")
|
||||
run_acceleration = 150.0
|
||||
run_acceleration = 200.0
|
||||
max_run_speed = 100.0
|
||||
turn_acceleration = 250.0
|
||||
turn_acceleration = 300.0
|
||||
stopping_force = 200.0
|
||||
gravity = 450.0
|
||||
jump_power = 180.0
|
||||
|
@ -157,6 +157,12 @@ to = NodePath("../Grounded")
|
|||
event = &"killed"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="on Launched" type="Node" parent="StateChart/Root"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../Airborne/Missile")
|
||||
event = &"launched"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="Grounded" type="Node" parent="StateChart/Root"]
|
||||
editor_description = "Player is standing on a floor."
|
||||
script = ExtResource("6_jnxnd")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue