This commit is contained in:
Leon Palluch 2020-01-27 16:44:21 +01:00
commit 47b17b65c3
3 changed files with 239 additions and 8 deletions

View File

@ -78,6 +78,7 @@ func _ready():
_lookCast.cast_to = Vector3(0, 0, INTERACT_DISTANCE) _lookCast.cast_to = Vector3(0, 0, INTERACT_DISTANCE)
_inventory = get_node("HUD") _inventory = get_node("HUD")
assert(null != _inventory)
# Set special fast time when in labyrinth # Set special fast time when in labyrinth
if IsInLabyrinth: if IsInLabyrinth:
@ -164,7 +165,6 @@ func process_collision_layers():
func check_interact(): func check_interact():
if _lookCast.is_colliding(): if _lookCast.is_colliding():
var collider = _lookCast.get_collider() var collider = _lookCast.get_collider()
if null != collider and collider.is_in_group("Touchables"): if null != collider and collider.is_in_group("Touchables"):
#show interact tooltip #show interact tooltip
_labelInteract.show() _labelInteract.show()
@ -181,8 +181,8 @@ func check_interact():
collider.do_interact(self) collider.do_interact(self)
if collider.is_in_group("Collectibles"): if collider.is_in_group("Collectibles"):
_inventory.add_item(collider.name) _inventory.add_item(collider.name)
#bugfix: remove _prev_look after taken _prev_look = null # remove after taken
_prev_look = null _labelInteract.hide()
else: else:
#stop showing interact tooltip and disable outline #stop showing interact tooltip and disable outline
_labelInteract.hide() _labelInteract.hide()
@ -253,11 +253,9 @@ func _on_respawn ():
yield(_animationFadeOut, "animation_finished") yield(_animationFadeOut, "animation_finished")
_animationFadeOut.seek(0, true) _animationFadeOut.seek(0, true)
# reset values
Daytime._set_time(0) Daytime._set_time(0)
Logger.info("save areas: " + String(_save_areas)) #Logger.info("save areas: " + String(_save_areas))
if _save_areas < 1 and not IsInLabyrinth: if _save_areas < 1 and not IsInLabyrinth:
Logger.info("reload scene") Logger.info("reload scene")

234
Level/OutsideWorld.tscn Normal file

File diff suppressed because one or more lines are too long

View File

@ -78,7 +78,6 @@ PillAudioHandler="*res://Global/PillAudioHandler.tscn"
window/size/width=1600 window/size/width=1600
window/size/height=900 window/size/height=900
window/size/borderless=true window/size/borderless=true
window/size/fullscreen=true
[input] [input]