added a talking rock
This commit is contained in:
		| @@ -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") | ||||
|   | ||||
| @@ -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(): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user