added a talking rock

This commit is contained in:
2024-09-07 14:12:04 -04:00
parent 1573768619
commit 55a291e2ae
79 changed files with 14358 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=45 format=3 uid="uid://cny5b638kjd3w"]
[gd_scene load_steps=46 format=3 uid="uid://cny5b638kjd3w"]
[ext_resource type="Texture2D" uid="uid://3ysrchetuhic" path="res://Assets/Characters/Friendly/Tellik/Idle/Telick_standing_01.png" id="1_ify6l"]
[ext_resource type="Script" path="res://Assets/Characters/Friendly/Tellik/tellick.gd" id="1_q21sg"]
@@ -178,6 +178,9 @@ animations = [{
radius = 21.0
height = 182.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_a2ym7"]
size = Vector2(41, 174.5)
[node name="Tellick" type="CharacterBody2D"]
z_index = 100
collision_layer = 2
@@ -191,3 +194,13 @@ autoplay = "default"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_aoset")
[node name="Marker2D" type="Marker2D" parent="."]
[node name="ActionableFinder" type="Area2D" parent="Marker2D"]
collision_layer = 0
collision_mask = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="Marker2D/ActionableFinder"]
position = Vector2(43, -2.75)
shape = SubResource("RectangleShape2D_a2ym7")

View File

@@ -10,6 +10,14 @@ const FALL_GRAVITY_MULTIPLIER = 2
var jump_timer = 0.0
var is_jumping = false
@onready var actionableFinder: Area2D = $Marker2D/ActionableFinder
func _unhandled_input(event: InputEvent) -> void:
if Input.is_action_just_pressed("ui_accept"):
var actionables = actionableFinder.get_overlapping_areas()
if actionables.size() > 0:
actionables[0].action()
return
func _physics_process(delta):
# Apply gravity
if not is_on_floor():

View File

@@ -0,0 +1,19 @@
[gd_scene load_steps=3 format=3 uid="uid://bop7ohwaq22g7"]
[ext_resource type="Texture2D" uid="uid://dtjckad6fcx2" path="res://Assets/World/Structures/Ruins_05.png" id="1_fuich"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_b6xvq"]
size = Vector2(14, 14)
[node name="Rock" type="Area2D"]
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(1, 0)
scale = Vector2(0.291667, 0.291667)
texture = ExtResource("1_fuich")
region_enabled = true
region_rect = Rect2(2446.81, 2910.55, 48.8418, 48.8418)
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(1, 0)
shape = SubResource("RectangleShape2D_b6xvq")