diff --git a/Assets/Audio/Master.bank b/Assets/Audio/Master.bank index f6cce22f..2f87ff17 100644 Binary files a/Assets/Audio/Master.bank and b/Assets/Audio/Master.bank differ diff --git a/Assets/Audio/Master.strings.bank b/Assets/Audio/Master.strings.bank index 7f71c9b1..45623644 100644 Binary files a/Assets/Audio/Master.strings.bank and b/Assets/Audio/Master.strings.bank differ diff --git a/Assets/Audio/Music.bank b/Assets/Audio/Music.bank index 5d5708e6..beabe885 100644 Binary files a/Assets/Audio/Music.bank and b/Assets/Audio/Music.bank differ diff --git a/Assets/Audio/SFX.bank b/Assets/Audio/SFX.bank index 5826bbc7..e1a85b71 100644 Binary files a/Assets/Audio/SFX.bank and b/Assets/Audio/SFX.bank differ diff --git a/Assets/Audio/footsteps.bank b/Assets/Audio/footsteps.bank deleted file mode 100644 index ce53111e..00000000 Binary files a/Assets/Audio/footsteps.bank and /dev/null differ diff --git a/Assets/Scenes/MainGame.shade b/Assets/Scenes/MainGame.shade index b2f41cec..82cfce3e 100644 --- a/Assets/Scenes/MainGame.shade +++ b/Assets/Scenes/MainGame.shade @@ -8201,105 +8201,17 @@ - EID: 240 Name: ====ItemPool==== IsActive: true - NumberOfChildren: 3 + NumberOfChildren: 9 Components: ~ Scripts: ~ -- EID: 16 - Name: Mesh_Apple - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 1.20656121, y: 0.124672964, z: 5.97578335} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - Renderable Component: - Mesh: 144128170 - Material: 131956078 - IsActive: true - RigidBody Component: - Type: Dynamic - Drag: 0.00999999978 - Angular Drag: 0.00999999978 - Use Gravity: true - Interpolate: true - Sleeping Enabled: true - Freeze Position X: false - Freeze Position Y: false - Freeze Position Z: false - Freeze Rotation X: false - Freeze Rotation Y: false - Freeze Rotation Z: false - IsActive: true - Collider Component: - Colliders: - - Is Trigger: false - Type: Box - Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - IsActive: true - Scripts: - - Type: Item - Enabled: true - Score: 10 - currCategory: 0 -- EID: 242 - Name: Mesh_Cheese - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 1.89451575, y: 0.156862095, z: 6.01846552} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - Renderable Component: - Mesh: 141841143 - Material: 131956078 - IsActive: true - RigidBody Component: - Type: Dynamic - Drag: 0.00999999978 - Angular Drag: 0.00999999978 - Use Gravity: true - Interpolate: true - Sleeping Enabled: true - Freeze Position X: false - Freeze Position Y: false - Freeze Position Z: false - Freeze Rotation X: false - Freeze Rotation Y: false - Freeze Rotation Z: false - IsActive: true - Collider Component: - Colliders: - - Is Trigger: false - Type: Box - Half Extents: {x: 0.5, y: 0.150000006, z: 0.5} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - IsActive: true - Scripts: - - Type: Item - Enabled: true - Score: 100 - currCategory: 2 - EID: 241 Name: Mesh_Meat IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 2.83309579, y: 0.209537908, z: 5.95318222} - Rotate: {x: 0, y: 0, z: 0} + Translate: {x: 4.2743969, y: 0.209537908, z: 4.31536102} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: @@ -8336,6 +8248,358 @@ Enabled: true Score: 50 currCategory: 1 +- EID: 157 + Name: Mesh_Meat + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 4.0829463, y: 1.37235689, z: -4.4815464} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 136892700 + Material: 131956078 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.00999999978 + Use Gravity: true + Interpolate: true + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: false + Freeze Rotation Y: false + Freeze Rotation Z: false + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 0.300000012, y: 0.300000012, z: 0.300000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 +- EID: 156 + Name: Mesh_Meat + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -1.74228501, y: 0.927017033, z: -1.76112592} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 136892700 + Material: 131956078 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.00999999978 + Use Gravity: true + Interpolate: true + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: false + Freeze Rotation Y: false + Freeze Rotation Z: false + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 0.300000012, y: 0.300000012, z: 0.300000012} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 +- EID: 155 + Name: Mesh_Cheese + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -2.89926314, y: 1.15123272, z: 4.36190414} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 141841143 + Material: 131956078 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.00999999978 + Use Gravity: true + Interpolate: true + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: false + Freeze Rotation Y: false + Freeze Rotation Z: false + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 0.5, y: 0.150000006, z: 0.5} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 100 + currCategory: 2 +- EID: 154 + Name: Mesh_Cheese + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.26750499, y: 1.28282726, z: 0.749736428} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 141841143 + Material: 131956078 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.00999999978 + Use Gravity: true + Interpolate: true + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: false + Freeze Rotation Y: false + Freeze Rotation Z: false + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 0.5, y: 0.150000006, z: 0.5} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 100 + currCategory: 2 +- EID: 153 + Name: Mesh_Cheese + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -4.28802347, y: 0.990184903, z: 3.08095932} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 141841143 + Material: 131956078 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.00999999978 + Use Gravity: true + Interpolate: true + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: false + Freeze Rotation Y: false + Freeze Rotation Z: false + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 0.5, y: 0.150000006, z: 0.5} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 100 + currCategory: 2 +- EID: 65778 + Name: Mesh_Apple + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.667112291, y: 1.25251341, z: -4.2965107} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 144128170 + Material: 131956078 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.00999999978 + Use Gravity: true + Interpolate: true + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: false + Freeze Rotation Y: false + Freeze Rotation Z: false + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 +- EID: 152 + Name: Mesh_Apple + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 4.5356307, y: 0.850251734, z: 4.42769098} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 144128170 + Material: 131956078 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.00999999978 + Use Gravity: true + Interpolate: true + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: false + Freeze Rotation Y: false + Freeze Rotation Z: false + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 +- EID: 151 + Name: Mesh_Apple + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 2.47664404, y: 0.904378593, z: -4.45292473} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 144128170 + Material: 131956078 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.00999999978 + Use Gravity: true + Interpolate: true + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: false + Freeze Rotation Y: false + Freeze Rotation Z: false + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 - EID: 15 Name: ====ScoreZonePool==== IsActive: true @@ -8433,7 +8697,7 @@ currGameState: 0 totalItemCount: 0 Score: 0 - timer: 100 + timer: 200 scoreText: 237 timeText: 206 - EID: 199 @@ -8526,8 +8790,8 @@ moveForce: 50 sprintMultiplier: 1.5 rotationFactorPerFrame: 5 - maxJumpHeight: 1 - maxJumpTime: 0.5 + maxJumpHeight: 2 + maxJumpTime: 0.75 fallMultipler: 3 lightMultiper: 0.75 mediumMultiper: 0.5 @@ -8627,13 +8891,13 @@ NumberOfChildren: 4 Components: Transform Component: - Translate: {x: 1.10128331, y: 0.1594823, z: 7.20125246} - Rotate: {x: 0, y: 0, z: 0} + Translate: {x: 4.39069891, y: 1.33369851, z: -2.95690465} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999979734, y: 1, z: 0.999979734} IsActive: true Renderable Component: Mesh: 140964851 - Material: 126974645 + Material: 124370424 IsActive: true RigidBody Component: Type: Dynamic @@ -8831,13 +9095,13 @@ NumberOfChildren: 4 Components: Transform Component: - Translate: {x: 2.97949171, y: 0.1594823, z: 7.20125246} + Translate: {x: -1.62782168, y: 1.24122202, z: 0.321960568} Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999979734, y: 1, z: 0.999979734} IsActive: true Renderable Component: Mesh: 140964851 - Material: 126974645 + Material: 124370424 IsActive: true RigidBody Component: Type: Dynamic @@ -8955,8 +9219,8 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0.0431699753, y: 1.18017197e-05, z: -0.0288243294} - Rotate: {x: -0, y: 0, z: 0.174533099} + Translate: {x: 0.0431697369, y: 1.18017197e-05, z: -0.0288243294} + Rotate: {x: 0, y: 0, z: 0.174533099} Scale: {x: 0.999999881, y: 0.999999583, z: 1} IsActive: true Renderable Component: @@ -9035,13 +9299,13 @@ NumberOfChildren: 4 Components: Transform Component: - Translate: {x: 3.0075531, y: 0.1594823, z: 8.19898987} + Translate: {x: 2.44600534, y: 0.118150897, z: 5.19178057} Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999979734, y: 1, z: 0.999979734} IsActive: true Renderable Component: Mesh: 140964851 - Material: 126974645 + Material: 124370424 IsActive: true RigidBody Component: Type: Dynamic diff --git a/Assets/Scripts/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs b/Assets/Scripts/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs index 2f9c8e1a..84c45779 100644 --- a/Assets/Scripts/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs +++ b/Assets/Scripts/AIBehaviour/Implemented/LeafNodes/LeafPatrol.cs @@ -240,6 +240,8 @@ public partial class LeafPatrol : BehaviourTreeNode { //Debug.Log("Unalert"); Audio.PlaySFXOnce2D("event:/Homeowner/humming"); + Audio.StopAllSounds(); + Audio.PlayBGMOnce2D("event:/Music/player_undetected"); } SetNodeData("isAlert", false); } diff --git a/Assets/Scripts/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs b/Assets/Scripts/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs index 4fa5e376..7c68712c 100644 --- a/Assets/Scripts/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs +++ b/Assets/Scripts/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs @@ -186,12 +186,18 @@ public partial class LeafSearch : BehaviourTreeNode { SetNodeData("isAlert", true); Audio.PlaySFXOnce2D("event:/Homeowner/homeowner_detect_raccoon"); + Audio.PlaySFXOnce2D("event:/Music/stingers/player_detected"); + Audio.StopAllSounds(); + Audio.PlayBGMOnce2D("event:/Music/player_detected"); } else { if (GetNodeData("isAlert") != null && (bool)GetNodeData("isAlert") == false) { Audio.PlaySFXOnce2D("event:/Homeowner/homeowner_detect_raccoon"); + Audio.PlaySFXOnce2D("event:/Music/stingers/player_detected"); + Audio.StopAllSounds(); + Audio.PlayBGMOnce2D("event:/Music/player_detected"); } SetNodeData("isAlert", true); } diff --git a/Assets/Scripts/Gameplay/Breakable.cs b/Assets/Scripts/Gameplay/Breakable.cs index 06f8a5e3..a7406499 100644 --- a/Assets/Scripts/Gameplay/Breakable.cs +++ b/Assets/Scripts/Gameplay/Breakable.cs @@ -59,6 +59,7 @@ public class Breakable : Script } isBreak = false; + Audio.PlaySFXOnce2D("event:/Props/impact_break"); Owner.SetActive(false); } } \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index 47dd2c41..c9e7b81e 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -119,7 +119,6 @@ public class PlayerController : Script protected override void lateUpdate() { - //rb.FreezePositionY = false; } protected override void update() { @@ -152,6 +151,7 @@ public class PlayerController : Script camArm = GetComponentInChildren(); Rotation(); + Jump(); GotCaught(); //Debug.Log($"{currentState}"); //Debug.Log($" axisX: {axisMove.x} axisY:{axisMove.y}"); @@ -165,7 +165,6 @@ public class PlayerController : Script MoveKey(); Move(); Sprint(); - Jump(); Gravity(); //Debug.Log($"X: {rb.LinearVelocity.x}" + $" Z: {rb.LinearVelocity.z}"); } diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index 0f54c33c..e2f1b45f 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -76,33 +76,25 @@ public class GameManager : Script if(timeText) timeText.GetComponent().Text = $"Time Left: {timer.ToString("0.00")}"; - if (timer > 0 && totalItemCount <= 0) + if ((timer > 0 && totalItemCount <= 0) || Input.GetKeyDown(Input.KeyCode.F1)) { currGameState = GameState.WIN; Audio.StopAllSounds(); SceneManager.ChangeScene(winScene); + Audio.PlaySFXOnce2D("event:/Music/stingers/game_win"); } - else if(timer < 0) + else if(timer < 0 || Input.GetKeyDown(Input.KeyCode.F2)) { currGameState = GameState.LOSE; Audio.StopAllSounds(); SceneManager.ChangeScene(loseScene); + Audio.PlaySFXOnce2D("event:/Music/stingers/game_lose"); } } } private void Cheats() { - if (Input.GetKeyDown(Input.KeyCode.F1)) - { - Audio.StopAllSounds(); - SceneManager.ChangeScene(loseScene); - } - if (Input.GetKeyDown(Input.KeyCode.F2)) - { - Audio.StopAllSounds(); - SceneManager.ChangeScene(winScene); - } if (Input.GetKeyDown(Input.KeyCode.Escape)) { Audio.StopAllSounds(); diff --git a/Assets/Scripts/SC_EndScene.cs b/Assets/Scripts/SC_EndScene.cs index d22157a4..8d3104c5 100644 --- a/Assets/Scripts/SC_EndScene.cs +++ b/Assets/Scripts/SC_EndScene.cs @@ -14,12 +14,14 @@ public class EndScene : Script if (Input.GetKey(Input.KeyCode.R)) { Audio.PlaySFXOnce2D("event:/UI/mouse_down_element"); + Audio.StopAllSounds(); SceneManager.ChangeScene(mainGameScene); } if (Input.GetKey(Input.KeyCode.M)) { Audio.PlaySFXOnce2D("event:/UI/mouse_down_element"); + Audio.StopAllSounds(); SceneManager.ChangeScene(mainMainScene); }