Major collision detection improvements, more file organization, and added key interactable
This commit is contained in:
@@ -8,25 +8,25 @@
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 2 ) ],
|
||||
"loop": false,
|
||||
"name": "look_right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 3 ) ],
|
||||
"loop": false,
|
||||
"name": "look_down",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"frames": [ ExtResource( 2 ) ],
|
||||
"loop": false,
|
||||
"name": "look_up",
|
||||
"name": "look_right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 2 ) ],
|
||||
"loop": false,
|
||||
"name": "look_left",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"loop": false,
|
||||
"name": "look_up",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=2]
|
||||
@@ -180,7 +180,7 @@ graph_offset = Vector2( -3591.37, -302.6 )
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=14]
|
||||
|
||||
[node name="Player" type="KinematicBody2D"]
|
||||
[node name="Player" type="KinematicBody2D" groups=["player"]]
|
||||
collision_layer = 2
|
||||
script = ExtResource( 1 )
|
||||
|
||||
@@ -188,16 +188,17 @@ script = ExtResource( 1 )
|
||||
light_mask = 2
|
||||
frames = SubResource( 1 )
|
||||
animation = "look_right"
|
||||
offset = Vector2( 0, -5 )
|
||||
offset = Vector2( 0, -4 )
|
||||
|
||||
[node name="Collision" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="."]
|
||||
[node name="Hitbox" type="Area2D" parent="." groups=["player_hitbox"]]
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
collision_mask = 4
|
||||
input_pickable = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||
visible = false
|
||||
@@ -220,5 +221,5 @@ parameters/Idle/blend_position = Vector2( 0.0760697, 0 )
|
||||
|
||||
[node name="Inventory" parent="." instance=ExtResource( 5 )]
|
||||
|
||||
[connection signal="body_entered" from="Hitbox" to="." method="_on_Hitbox_body_entered"]
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_hitbox_area_entered"]
|
||||
[connection signal="update_currency" from="Inventory" to="." method="_on_Inventory_update_currency"]
|
||||
|
Reference in New Issue
Block a user