sg pushin' shovin' squishin' some snails n' skeles with rocks
This commit is contained in:
parent
56fb173a24
commit
3ba9afd2be
4 changed files with 117 additions and 17 deletions
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=37 format=2]
|
||||
[gd_scene load_steps=39 format=2]
|
||||
|
||||
[ext_resource path="res://objects/player/player_scholar.gd" type="Script" id=1]
|
||||
[ext_resource path="res://graphics/player/pal_purplearmor.png" type="Texture" id=2]
|
||||
|
@ -20,6 +20,7 @@
|
|||
[ext_resource path="res://graphics/particles/dust.png" type="Texture" id=18]
|
||||
[ext_resource path="res://graphics/player/sg_fall_scared.png" type="Texture" id=19]
|
||||
[ext_resource path="res://graphics/player/sg_fall.png" type="Texture" id=20]
|
||||
[ext_resource path="res://graphics/player/sg_push.png" type="Texture" id=21]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=1]
|
||||
shader = ExtResource( 3 )
|
||||
|
@ -407,6 +408,59 @@ tracks/3/keys = {
|
|||
"values": [ 0.0 ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=17]
|
||||
resource_name = "push"
|
||||
length = 0.8
|
||||
loop = true
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Graphics/Sprite:texture")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 1,
|
||||
"values": [ ExtResource( 21 ) ]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("Graphics/Sprite:hframes")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 1,
|
||||
"values": [ 4 ]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("Graphics/Sprite:frame")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0, 0.2, 0.4, 0.6 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 0, 1, 2, 3 ]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ 0.0 ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=11]
|
||||
resource_name = "shoot_airborne"
|
||||
length = 0.001
|
||||
|
@ -650,6 +704,12 @@ scale_amount = 0.25
|
|||
scale_amount_random = 0.5
|
||||
scale_amount_curve = SubResource( 13 )
|
||||
|
||||
[node name="PushableDetector" type="RayCast2D" parent="Graphics"]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2( 3, -4 )
|
||||
cast_to = Vector2( 1, 0 )
|
||||
collision_mask = 4
|
||||
|
||||
[node name="BodyShape" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0.5, -5 )
|
||||
shape = SubResource( 2 )
|
||||
|
@ -685,6 +745,7 @@ anims/fall = SubResource( 15 )
|
|||
anims/fall_scared = SubResource( 14 )
|
||||
anims/idle = SubResource( 6 )
|
||||
anims/jump = SubResource( 8 )
|
||||
anims/push = SubResource( 17 )
|
||||
anims/shoot_airborne = SubResource( 11 )
|
||||
anims/shoot_grounded = SubResource( 10 )
|
||||
anims/walk = SubResource( 7 )
|
||||
|
@ -749,6 +810,11 @@ to = NodePath("../../Shooting")
|
|||
event = "shoot"
|
||||
guard_expression = "can_shoot"
|
||||
|
||||
[node name="On PushStart" type="Node" parent="StateChart/Root/Movement/Grounded/CanWalk"]
|
||||
script = ExtResource( 10 )
|
||||
to = NodePath("../../Pushing")
|
||||
event = "push_start"
|
||||
|
||||
[node name="Shooting" type="Node" parent="StateChart/Root/Movement/Grounded"]
|
||||
script = ExtResource( 11 )
|
||||
consumed_events = [ "jump" ]
|
||||
|
@ -761,6 +827,11 @@ event = "shoot_end"
|
|||
[node name="Pushing" type="Node" parent="StateChart/Root/Movement/Grounded"]
|
||||
script = ExtResource( 11 )
|
||||
|
||||
[node name="On PushStop" type="Node" parent="StateChart/Root/Movement/Grounded/Pushing"]
|
||||
script = ExtResource( 10 )
|
||||
to = NodePath("../../CanWalk")
|
||||
event = "push_stop"
|
||||
|
||||
[node name="Airborne" type="Node" parent="StateChart/Root/Movement"]
|
||||
process_priority = 5
|
||||
script = ExtResource( 9 )
|
||||
|
@ -934,6 +1005,8 @@ script = ExtResource( 8 )
|
|||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_horizontal_movement"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_can_walk"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/Shooting" to="." method="_on_Shooting_state_entered"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/Pushing" to="." method="_on_Pushing_state_entered"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/Pushing" to="." method="_process_pushing"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Movement/Airborne" to="." method="_on_Airborne_state_entered"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne" to="." method="_process_gravity"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Jump" to="." method="_process_jump"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue