diff --git a/Assets/Audio/SFX.bank b/Assets/Audio/SFX.bank index 01b66d75..62740294 100644 Binary files a/Assets/Audio/SFX.bank and b/Assets/Audio/SFX.bank differ diff --git a/Assets/Navigation Data/Level3_NavData.shnav b/Assets/Navigation Data/Level3_NavData.shnav index 42d64e5b..43cab183 100644 Binary files a/Assets/Navigation Data/Level3_NavData.shnav and b/Assets/Navigation Data/Level3_NavData.shnav differ diff --git a/Assets/Navigation Data/Level3_NavData.shnav.shmeta b/Assets/Navigation Data/Level3_NavData.shnav.shmeta index 211b87b7..02c68390 100644 --- a/Assets/Navigation Data/Level3_NavData.shnav.shmeta +++ b/Assets/Navigation Data/Level3_NavData.shnav.shmeta @@ -1,3 +1,3 @@ Name: Level3_NavData -ID: 263362242 +ID: 252819653 Type: 15 diff --git a/Assets/Scenes/Level3.shade b/Assets/Scenes/Level3.shade index 6e63cb6e..f1e2a19f 100644 --- a/Assets/Scenes/Level3.shade +++ b/Assets/Scenes/Level3.shade @@ -1,4 +1,4 @@ -- NavData: 263362242 +- NavData: 252819653 - EID: 0 Name: Light_Direction IsActive: true @@ -6,7 +6,7 @@ Components: Transform Component: Translate: {x: -4.64838362, y: 2.94342947, z: 0.209690213} - Rotate: {x: 6.41686916, y: 0.727440596, z: 2.90124035} + Rotate: {x: 2.99841309, y: 1.61244416, z: -0.287879944} Scale: {x: 1, y: 1, z: 1} IsActive: true Light Component: @@ -3626,7 +3626,7 @@ Components: Transform Component: Translate: {x: 2.75, y: 0, z: 6.25} - Rotate: {x: 0, y: 0, z: 0} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.75, y: 0.75, z: 0.75} IsActive: true Renderable Component: @@ -5367,7 +5367,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 3.25, y: 0, z: 7.55967045} + Translate: {x: 3.47301221, y: 0, z: 8.17157459} Rotate: {x: -0, y: 0, z: -0} Scale: {x: 1, y: 1, z: 1} IsActive: true @@ -10590,7 +10590,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 2.91941047, y: 0.527999997, z: 7.41522264} + Translate: {x: 2.91941047, y: 0.527999997, z: 8.10036278} Rotate: {x: -0, y: 0, z: -0} Scale: {x: 1, y: 1, z: 1} IsActive: true @@ -14794,8 +14794,8 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 3.65231538, y: 0.438600183, z: 7.60280371} - Rotate: {x: 0, y: 0, z: 0} + Translate: {x: 3.65231538, y: 0.438600183, z: 8.16182518} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: @@ -15265,7 +15265,13 @@ Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: DecorationAudio + Enabled: true + name: spark1 + audio: event:/Props/sparks + loop: false + timeDruation: 2.29999995 - EID: 608 Name: Light particles IsActive: true @@ -15299,7 +15305,13 @@ Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: DecorationAudio + Enabled: true + name: spark2 + audio: event:/Props/sparks + loop: false + timeDruation: 3.20000005 - EID: 609 Name: Light particles IsActive: true @@ -15333,7 +15345,13 @@ Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: DecorationAudio + Enabled: true + name: spark3 + audio: event:/Props/sparks + loop: false + timeDruation: 2.5 - EID: 610 Name: Light particles IsActive: true @@ -15367,7 +15385,13 @@ Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: DecorationAudio + Enabled: true + name: spark4 + audio: event:/Props/sparks + loop: false + timeDruation: 3.29999995 - EID: 611 Name: Water particles IsActive: true @@ -15435,7 +15459,13 @@ Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: DecorationAudio + Enabled: true + name: spark5 + audio: event:/Props/sparks + loop: false + timeDruation: 2.29999995 - EID: 613 Name: Water particles IsActive: true @@ -15469,7 +15499,13 @@ Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.899999976, z: 0} IsActive: true - Scripts: ~ + Scripts: + - Type: DecorationAudio + Enabled: true + name: water2 + audio: event:/Props/tap_loop + loop: true + timeDruation: 0.5 - EID: 615 Name: Water particles IsActive: true diff --git a/Assets/Scripts/Gameplay/AIBehaviour/AIRework/States/AttackState.cs b/Assets/Scripts/Gameplay/AIBehaviour/AIRework/States/AttackState.cs index a826c170..8563e823 100644 --- a/Assets/Scripts/Gameplay/AIBehaviour/AIRework/States/AttackState.cs +++ b/Assets/Scripts/Gameplay/AIBehaviour/AIRework/States/AttackState.cs @@ -92,7 +92,8 @@ namespace SHADE_Scripting.Gameplay.AIBehaviour.AIRework.States { raccoonCaught = true; Transform pcTransform = ai.player.GetComponent(); - Transform netTransform = ai.attackHitbox.GetComponentInChildren(); + ai.player.GetScript().Caught(); + Transform netTransform = ai.attackHitbox.GetComponentInChildren(); if (pcTransform && netTransform) { pcTransform.GlobalPosition = netTransform.GlobalPosition; diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index 6276b96d..9d142e4c 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -435,10 +435,13 @@ public class PlayerController : Script } if (!isGrounded && rb != null && (rb.LinearVelocity.y < 0.0f || Input.GetKeyUp(Input.KeyCode.Space))) - { - currentState = RaccoonStates.FALLING; - if (stateMachine && !stateMachine.IsState(typeof(PlayerFallState))) - stateMachine.SetState(typeof(PlayerFallState)); + { + if (currentState != RaccoonStates.CAUGHT) + { + currentState = RaccoonStates.FALLING; + if (stateMachine && !stateMachine.IsState(typeof(PlayerFallState))) + stateMachine.SetState(typeof(PlayerFallState)); + } } } @@ -544,11 +547,8 @@ public class PlayerController : Script public void Reset() { - //Debug.Log("PlayerController: Raccon Reset " + currentState); - - if (currentState == RaccoonStates.CAUGHT && tranform && respawnPoint) + if (tranform && respawnPoint) { - //Debug.Log("PlayerController: Raccon Reset inside if " + currentState); currentState = RaccoonStates.IDLE; if (stateMachine && !stateMachine.IsState(typeof(PlayerIdleState))) stateMachine.SetState(typeof(PlayerIdleState)); diff --git a/Assets/Scripts/Gameplay/SC_DecorationAudio.cs b/Assets/Scripts/Gameplay/SC_DecorationAudio.cs new file mode 100644 index 00000000..55b35a0b --- /dev/null +++ b/Assets/Scripts/Gameplay/SC_DecorationAudio.cs @@ -0,0 +1,47 @@ +using SHADE; +using SHADE_Scripting.Audio; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +public class DecorationAudio : Script +{ + public string name = "REPLACETHIS"; + public string audio = "event:/UI/botton_hover"; + public bool loop = true; + public float timeDruation = 0.5f; + private float timer = 0.0f; + + protected override void awake() + { + if (audio != "Empty") + { + AudioHandler.audioClipHandlers[name] = Audio.CreateAudioClip(audio); + Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers[name], GameObject.EntityId); + } + } + + protected override void start() + { + if (loop) + AudioHandler.audioClipHandlers[name].Play(); + + } + + protected override void update() + { + if (!loop) + { + timer += Time.DeltaTimeF; + if (timer > timeDruation) + { + timer = 0.0f; + AudioHandler.audioClipHandlers[name].Play(); + } + } + } + +} + diff --git a/Assets/Scripts/Gameplay/SC_DecorationAudio.cs.shmeta b/Assets/Scripts/Gameplay/SC_DecorationAudio.cs.shmeta new file mode 100644 index 00000000..f38b5a95 --- /dev/null +++ b/Assets/Scripts/Gameplay/SC_DecorationAudio.cs.shmeta @@ -0,0 +1,3 @@ +Name: SC_DecorationAudio +ID: 166447267 +Type: 9