Merge branch 'main' of http://git.nanoyagi.com/NanoYagi/JumpRopeOldTech
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
commit
4d9cb93483
5 files changed
+22
-13
No files matched your search
@@ -4,6 +4,8 @@
|
|||||||
[ext_resource type="Script" uid="uid://byj4ibepgm6oa" path="res://dialogue.gd" id="1_tgtc2"]
|
[ext_resource type="Script" uid="uid://byj4ibepgm6oa" path="res://dialogue.gd" id="1_tgtc2"]
|
||||||
|
|
||||||
[node name="Dialogue" type="TextureRect" unique_id=733911232]
|
[node name="Dialogue" type="TextureRect" unique_id=733911232]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
|||||||
+10
-6
@@ -7,7 +7,7 @@ var checked_teleport
|
|||||||
var telecam_speed_mult = 4
|
var telecam_speed_mult = 4
|
||||||
var enabled = true
|
var enabled = true
|
||||||
var cooldown = 2
|
var cooldown = 2
|
||||||
var is_interactable = false
|
var _is_interactable = false
|
||||||
|
|
||||||
func disable():
|
func disable():
|
||||||
enabled = false
|
enabled = false
|
||||||
@@ -17,10 +17,12 @@ func enable():
|
|||||||
enabled = true
|
enabled = true
|
||||||
$Sprite2D.modulate = Color.WHITE
|
$Sprite2D.modulate = Color.WHITE
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func is_interactable() -> bool:
|
||||||
if not (is_interactable and Input.is_action_just_released("interact")):
|
return _is_interactable
|
||||||
return
|
|
||||||
|
|
||||||
|
func interact() -> void:
|
||||||
|
if not is_interactable():
|
||||||
|
return
|
||||||
interacted.emit()
|
interacted.emit()
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
@@ -29,11 +31,13 @@ func _physics_process(delta: float) -> void:
|
|||||||
func _on_approach(body) -> void:
|
func _on_approach(body) -> void:
|
||||||
if body!=%Player2D:
|
if body!=%Player2D:
|
||||||
return
|
return
|
||||||
is_interactable = true
|
_is_interactable = true
|
||||||
|
self.add_to_group("nearby_interactables")
|
||||||
$Sprite2D/ButtonPrompt.show()
|
$Sprite2D/ButtonPrompt.show()
|
||||||
|
|
||||||
func _on_abandon(body) -> void:
|
func _on_abandon(body) -> void:
|
||||||
if body!=%Player2D:
|
if body!=%Player2D:
|
||||||
return
|
return
|
||||||
is_interactable = false
|
_is_interactable = false
|
||||||
|
self.remove_from_group("nearby_interactables")
|
||||||
$Sprite2D/ButtonPrompt.hide()
|
$Sprite2D/ButtonPrompt.hide()
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
extends Interactable
|
extends Interactable
|
||||||
|
|
||||||
func _on_interacted() -> void:
|
func _on_interacted() -> void:
|
||||||
#%OldComputer.open()
|
%OldComputer.open()
|
||||||
|
|
||||||
#Accomodate some collision antics.
|
#Accomodate some collision antics.
|
||||||
var new_spawn_point = global_position + Vector2(0,-10)
|
var new_spawn_point = global_position + Vector2(0,-10)
|
||||||
|
|||||||
+7
-4
@@ -119,8 +119,14 @@ func _process(delta: float) -> void:
|
|||||||
if Input.is_action_just_released("restart") or (Input.is_action_pressed("controller_restart_left") and Input.is_action_pressed("controller_restart_right")):
|
if Input.is_action_just_released("restart") or (Input.is_action_pressed("controller_restart_left") and Input.is_action_pressed("controller_restart_right")):
|
||||||
get_tree().reload_current_scene()
|
get_tree().reload_current_scene()
|
||||||
|
|
||||||
|
if %OldComputer.visible:
|
||||||
|
if Input.is_action_just_released("interact") or Input.is_action_just_released("jump"):
|
||||||
|
%OldComputer.close()
|
||||||
|
return
|
||||||
|
|
||||||
if Input.is_action_just_released("interact"):
|
if Input.is_action_just_released("interact"):
|
||||||
%OldComputer.close()
|
for interactable in get_tree().get_nodes_in_group("nearby_interactables"):
|
||||||
|
interactable.interact()
|
||||||
|
|
||||||
if Input.is_action_just_pressed("jump"):
|
if Input.is_action_just_pressed("jump"):
|
||||||
%OldComputer.close()
|
%OldComputer.close()
|
||||||
@@ -143,9 +149,6 @@ func _process(delta: float) -> void:
|
|||||||
#velocity.y = 0
|
#velocity.y = 0
|
||||||
#velocity.x = 0
|
#velocity.x = 0
|
||||||
|
|
||||||
if %OldComputer.visible:
|
|
||||||
return
|
|
||||||
|
|
||||||
var direction = Input.get_axis("move_left","move_right")
|
var direction = Input.get_axis("move_left","move_right")
|
||||||
|
|
||||||
if direction < 0:
|
if direction < 0:
|
||||||
|
|||||||
+2
-2
@@ -11,10 +11,10 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://dyxbitw8hbd3s" path="res://art/player/crouch/frame2.png" id="7_lu0ka"]
|
[ext_resource type="Texture2D" uid="uid://dyxbitw8hbd3s" path="res://art/player/crouch/frame2.png" id="7_lu0ka"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bfyd1tro3s0gl" path="res://art/player/crystal2.png" id="7_oy4pt"]
|
[ext_resource type="Texture2D" uid="uid://bfyd1tro3s0gl" path="res://art/player/crystal2.png" id="7_oy4pt"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dh7a1knyqn5nd" path="res://art/player/running/frame3.png" id="7_pmt5n"]
|
[ext_resource type="Texture2D" uid="uid://dh7a1knyqn5nd" path="res://art/player/running/frame3.png" id="7_pmt5n"]
|
||||||
[ext_resource type="Texture2D" uid="uid://lk0f1qyswyxv" path="res://art/player/running/frame1.png" id="8_3prq1"]
|
[ext_resource type="Texture2D" uid="uid://lk0f1qyswyxv" path="res://art/player/idle/frame1.png" id="8_3prq1"]
|
||||||
[ext_resource type="Texture2D" uid="uid://yf13nw31k8ua" path="res://art/player/running/frame4.png" id="8_nj6as"]
|
[ext_resource type="Texture2D" uid="uid://yf13nw31k8ua" path="res://art/player/running/frame4.png" id="8_nj6as"]
|
||||||
[ext_resource type="Texture2D" uid="uid://du5i0tg6u1lal" path="res://art/player/crystal3.png" id="8_ukfft"]
|
[ext_resource type="Texture2D" uid="uid://du5i0tg6u1lal" path="res://art/player/crystal3.png" id="8_ukfft"]
|
||||||
[ext_resource type="Texture2D" uid="uid://lmje8plw76e1" path="res://art/player/running/frame2.png" id="9_lu0ka"]
|
[ext_resource type="Texture2D" uid="uid://lmje8plw76e1" path="res://art/player/idle/frame2.png" id="9_lu0ka"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bko8dvawpul3c" path="res://art/player/crystal4.png" id="9_ur4nw"]
|
[ext_resource type="Texture2D" uid="uid://bko8dvawpul3c" path="res://art/player/crystal4.png" id="9_ur4nw"]
|
||||||
[ext_resource type="Texture2D" uid="uid://m5djssna67e1" path="res://art/player/crouch/frame3.png" id="9_w0gjo"]
|
[ext_resource type="Texture2D" uid="uid://m5djssna67e1" path="res://art/player/crouch/frame3.png" id="9_w0gjo"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ba4kjeulthw1g" path="res://art/hats/dunce1.png" id="10_5s8kx"]
|
[ext_resource type="Texture2D" uid="uid://ba4kjeulthw1g" path="res://art/hats/dunce1.png" id="10_5s8kx"]
|
||||||
|
|||||||
Reference in new issue
Block a user