Compare commits

..

No commits in common. "a0f190fef7130876c74d75c179e408a828ca2fe1" and "3973a2cfb7c94d40f8faab6215b5124a76ae3053" have entirely different histories.

5 changed files with 9 additions and 9 deletions

View File

@ -4,7 +4,7 @@ signal ini_room
@onready var card_board: CardBoard = %Board
@onready var card_picker: CardPicker = %Picker
@onready var player: PlayerController = %PlayerController
@onready var player: Player = %PlayerController
func start_room():
save_game = State.save_game

View File

@ -43,14 +43,14 @@ func _on_mouse_exited():
ui.is_collapsed = true
has_mouse = false
func try_reveal(for_player: PlayerController) -> bool:
func try_reveal(for_player: Player) -> bool:
print_debug("reveal ui!")
revealed = ui.try_reveal()
if revealed:
call_deferred("wait_for_ui_exit", for_player)
return revealed
func wait_for_ui_exit(for_player: PlayerController):
func wait_for_ui_exit(for_player: Player):
await for_player.ui_exited
collapse()

View File

@ -6,10 +6,10 @@ func ready():
func notify_player_entry(body: RigidBody3D):
print_debug("Player entered Crouch area.")
if body is PlayerController:
if body is Player:
body.inside_crouch_volume.append(self)
func notify_player_exit(body: RigidBody3D):
if body is PlayerController:
if body is Player:
body.inside_crouch_volume.erase(self)
body.crouched = false

View File

@ -8,6 +8,7 @@ var current_room_path: String:
@export var filepath: String:
set(value):
print_debug("Savegame: setting filepath: %s" % value)
filepath = value
if _is_initialised:
changed.emit()

View File

@ -1,4 +1,4 @@
class_name PlayerController extends RigidBody3D
class_name Player extends RigidBody3D
var has_stage: bool = false:
set(on_stage):
@ -241,9 +241,8 @@ func _input(event:InputEvent) -> void:
if event.is_action_pressed("collect_memento_ui") or event.is_action_pressed("option_memento_ui"):
if focus_ray.is_colliding():
var collider := focus_ray.get_collider()
if collider is InteractiveSprite:
collider.handle(event)
if focus_ray.get_collider().has_method("handle"):
focus_ray.get_collider().handle(event)
get_viewport().set_input_as_handled()
if event.is_action_pressed("crouch"):