"splat-launch" move :3
This commit is contained in:
parent
20f35ab240
commit
7779e241f6
6 changed files with 97 additions and 11 deletions
|
@ -79,23 +79,24 @@ turn_acceleration = 300.0
|
|||
stopping_force = 200.0
|
||||
gravity = 450.0
|
||||
jump_power = 180.0
|
||||
splat_launch_power = 240.0
|
||||
splat_offset = 6.0
|
||||
state_chart = NodePath("StateChart")
|
||||
graphics = NodePath("Graphics")
|
||||
run_animation = NodePath("Graphics/Sprite/Run")
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -6)
|
||||
shape = SubResource("CircleShape2D_tvyy1")
|
||||
debug_color = Color(3.32102e-06, 0.648976, 0.161954, 0.42)
|
||||
|
||||
[node name="Graphics" type="Node2D" parent="."]
|
||||
position = Vector2(0, -6)
|
||||
|
||||
[node name="Sprite" type="Sprite2D" parent="Graphics"]
|
||||
texture = ExtResource("3_trcll")
|
||||
offset = Vector2(0, -2)
|
||||
hframes = 4
|
||||
vframes = 4
|
||||
frame = 10
|
||||
region_rect = Rect2(0, 0, 64, 64)
|
||||
|
||||
[node name="Idle" type="Node" parent="Graphics/Sprite"]
|
||||
|
@ -128,6 +129,18 @@ first_frame = Vector2i(1, 2)
|
|||
script = ExtResource("4_bsdw5")
|
||||
first_frame = Vector2i(2, 2)
|
||||
|
||||
[node name="Splat" type="Node" parent="Graphics/Sprite"]
|
||||
script = ExtResource("4_bsdw5")
|
||||
first_frame = Vector2i(0, 3)
|
||||
frames = 2
|
||||
fps = 8.0
|
||||
|
||||
[node name="UnSplat" type="Node" parent="Graphics/Sprite"]
|
||||
script = ExtResource("4_bsdw5")
|
||||
first_frame = Vector2i(2, 3)
|
||||
frames = 2
|
||||
fps = 8.0
|
||||
|
||||
[node name="Sounds" type="Node" parent="."]
|
||||
|
||||
[node name="Voice" type="AudioStreamPlayer" parent="Sounds"]
|
||||
|
@ -140,7 +153,6 @@ bus = &"Capri"
|
|||
|
||||
[node name="StateChart" type="Node" parent="."]
|
||||
script = ExtResource("5_bcjtl")
|
||||
track_in_editor = true
|
||||
initial_expression_properties = {
|
||||
&"input_dir": Vector2(0, 0),
|
||||
&"on_floor": false,
|
||||
|
@ -285,6 +297,41 @@ delay_in_seconds = "0.0"
|
|||
editor_description = "Player is hurtling through the air and ricocheting off of surfaces."
|
||||
script = ExtResource("10_mvu25")
|
||||
|
||||
[node name="on Splatted" type="Node" parent="StateChart/Root/Airborne/Missile"]
|
||||
editor_description = "Transition to splat state when the player hits a wall"
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../../Floating/Splat")
|
||||
event = &"splatted"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="Floating" type="Node" parent="StateChart/Root"]
|
||||
script = ExtResource("6_jnxnd")
|
||||
initial_state = NodePath("UnSplat")
|
||||
|
||||
[node name="Splat" type="Node" parent="StateChart/Root/Floating"]
|
||||
editor_description = "Player has slammed into a surface (and has a moment to perform an action?)"
|
||||
script = ExtResource("10_mvu25")
|
||||
|
||||
[node name="on JumpPressed" type="Node" parent="StateChart/Root/Floating/Splat"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("..")
|
||||
event = &"jump_pressed"
|
||||
delay_in_seconds = ""
|
||||
|
||||
[node name="on TimeOut" type="Node" parent="StateChart/Root/Floating/Splat"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../UnSplat")
|
||||
delay_in_seconds = "0.75"
|
||||
|
||||
[node name="UnSplat" type="Node" parent="StateChart/Root/Floating"]
|
||||
editor_description = "Player is unsticking from a surface."
|
||||
script = ExtResource("10_mvu25")
|
||||
|
||||
[node name="on TimeOut" type="Node" parent="StateChart/Root/Floating/UnSplat"]
|
||||
script = ExtResource("7_rgjdc")
|
||||
to = NodePath("../../../Airborne/Falling")
|
||||
delay_in_seconds = ".25"
|
||||
|
||||
[connection signal="taken" from="StateChart/Root/on Killed" to="." method="_reset_position"]
|
||||
[connection signal="taken" from="StateChart/Root/on Killed" to="Sounds/Death" method="play"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Grounded/Standing/Idle" to="Graphics/Sprite/Idle" method="play"]
|
||||
|
@ -304,3 +351,8 @@ script = ExtResource("10_mvu25")
|
|||
[connection signal="state_entered" from="StateChart/Root/Airborne/Missile" to="Graphics/Sprite/Missile" method="play"]
|
||||
[connection signal="state_exited" from="StateChart/Root/Airborne/Missile" to="." method="_restore_graphics_rotation"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Airborne/Missile" to="." method="_face_towards_velocity"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Airborne/Missile" to="." method="_check_for_splat"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Floating/Splat" to="Graphics/Sprite/Splat" method="play"]
|
||||
[connection signal="taken" from="StateChart/Root/Floating/Splat/on JumpPressed" to="." method="_do_splat_launch"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Floating/UnSplat" to="Graphics/Sprite/UnSplat" method="play"]
|
||||
[connection signal="state_exited" from="StateChart/Root/Floating/UnSplat" to="." method="_restore_graphics_rotation"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue