added interaction system

This commit is contained in:
2022-11-30 22:09:48 +01:00
parent 68d16fbd4f
commit 5e983a9a5f
6 changed files with 19 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://ujfhvssvbgpg"]
[gd_scene load_steps=5 format=3 uid="uid://ujfhvssvbgpg"]
[ext_resource type="Script" path="res://src/scene-scripts/player.cs" id="1_qehox"]
[ext_resource type="Texture2D" uid="uid://ciidukjv5k6oa" path="res://assets/textures/debug/banana.png" id="2_1l1co"]
@@ -15,8 +15,6 @@ animations = [{
radius = 21.0
height = 66.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_jpkwv"]
[node name="player" type="CharacterBody2D"]
script = ExtResource("1_qehox")
@@ -30,10 +28,7 @@ shape = SubResource("CapsuleShape2D_38v5o")
current = true
zoom = Vector2(0.8, 0.8)
[node name="interaction_area" type="Area2D" parent="."]
[node name="interaction_collision" type="CollisionShape2D" parent="interaction_area"]
position = Vector2(-2.27374e-13, 65)
rotation = 1.5708
scale = Vector2(3, 5)
shape = SubResource("CapsuleShape2D_jpkwv")
[node name="ray_cast_2d" type="RayCast2D" parent="."]
target_position = Vector2(0, 64)
collision_mask = 2
collide_with_areas = true