From 2b2f61e8e60804659ad5e18bc7463eae7c744687 Mon Sep 17 00:00:00 2001 From: Sebastian Suciu Date: Thu, 21 Nov 2024 11:04:19 +1100 Subject: [PATCH 1/2] remove silly comment --- Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd b/Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd index e7194a52..5f6a7a7a 100644 --- a/Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd +++ b/Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd @@ -169,8 +169,8 @@ var is_crouching = false ###################################### @export_subgroup("Body parts") -@export var head : Node3D # Reference to the head of the player scene. (used for mouse movement and looking around) -@export var camera : Camera3D # Reference to the camera of the player (used for mouse movement and looking around) +@export var head : Node3D +@export var camera : Camera3D @export_subgroup("Inventory") @export var Slot1_Ref : StaticBody2D From 9f3861fdfd0e556c3a70c48c98d64cd0f92eadfe Mon Sep 17 00:00:00 2001 From: Sebastian Suciu Date: Thu, 21 Nov 2024 11:06:45 +1100 Subject: [PATCH 2/2] Fix #28 --- Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd b/Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd index 5f6a7a7a..3ce61e1e 100644 --- a/Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd +++ b/Scenes and Scripts/Scenes/Player/Player_SCRIPT.gd @@ -450,17 +450,16 @@ func takeDamageOverlay(): # Overlay when taking damage tween.tween_property($Head/Camera3D/OverlayLayer/RedOverlay, "self_modulate", Color(1, 0.018, 0, 0.808), 0).from(Color(1, 0.016, 0, 0)) # tween the red overlay's self modulate to red tween.tween_property($Head/Camera3D/OverlayLayer/RedOverlay, "self_modulate", Color(1, 0.016, 0, 0), 0.5) # tween the red overlay's self modulate to red -func _on_respawn(): # A function to respawn the player after death - GAME_STATE = "NORMAL" # set the game state to normal - PlayerData.GAME_STATE = GAME_STATE # set the player data's game state to the game state - func respawnFromDeath(): # A function to respawn the player from death self.position = StartPOS # set the player's position to the start position Health = MaxHealth # set the health to the max health PlayerData.Health = Health # set the player data's health to the health var tween = get_tree().create_tween() # create a tween - tween.connect("finished", _on_respawn, 1) # connect the finished signal to the respawn function + tween.tween_property($Head/Camera3D/DeathScreen/BlackOverlay, "self_modulate", Color(0, 0, 0, 0), 3) # tween the black overlay's self modulate to black + + GAME_STATE = "NORMAL" # set the game state to normal + PlayerData.GAME_STATE = GAME_STATE # set the player data's game state to the game state func _on_death_screen_finished(): # A function to call when the death screen is finished respawnFromDeath() # call the respawn from death function