diff --git a/Assets/Audio/Master.strings.bank b/Assets/Audio/Master.strings.bank index d858d0f6..60d036cb 100644 Binary files a/Assets/Audio/Master.strings.bank and b/Assets/Audio/Master.strings.bank differ diff --git a/Assets/Audio/SFX.bank b/Assets/Audio/SFX.bank index 7a7b0bbe..5826bbc7 100644 Binary files a/Assets/Audio/SFX.bank and b/Assets/Audio/SFX.bank differ diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index 30363b79..136584f0 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -54,4 +54,11 @@ Far: 10000 Perspective: true IsActive: true - Scripts: ~ \ No newline at end of file + Scripts: ~ +- EID: 4 + Name: Default + IsActive: true + NumberOfChildren: 0 + Components: ~ + Scripts: + - Type: MainMenu \ No newline at end of file diff --git a/Assets/Scenes/PlayerControllerTest.shade b/Assets/Scenes/PlayerControllerTest.shade index 9d9a7698..d39e7801 100644 --- a/Assets/Scenes/PlayerControllerTest.shade +++ b/Assets/Scenes/PlayerControllerTest.shade @@ -120,7 +120,7 @@ delayTimer: 1 aimingLength: 1.5 - Type: StateMachine - currentStateName: Idle State + currentStateName: "" currentAnimName: "" - EID: 3 Name: HoldingPoint @@ -140,13 +140,13 @@ Components: Transform Component: Translate: {x: 0, y: 0, z: 0} - Rotate: {x: -0.361278683, y: 4.97423792, z: 0} + Rotate: {x: -0.738241911, y: 0.48064509, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true Camera Component: - Position: {x: 0.330392599, y: -2.72767258, z: 5.02710676} - Pitch: -42.2981491 - Yaw: 16.4989166 + Position: {x: -0.0897406489, y: -4.07369709, z: 3.6087606} + Pitch: -42.2981453 + Yaw: 16.4989109 Roll: 0 Width: 1920 Height: 1080 @@ -275,10 +275,10 @@ - Type: GameManager itemPool: 12 zonePool: 15 - currGameState: 3 - totalItemCount: 2 + currGameState: 0 + totalItemCount: 0 Score: 0 - timer: 4.00741768 + timer: 50 - EID: 12 Name: ItemPool IsActive: true diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index 27e18659..4673d12c 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -92,19 +92,14 @@ public class PlayerController : Script //rigidbody check rb = GetComponent(); - if (rb == null) + if (!rb) Debug.LogError("RigidBody is NULL!"); //Transform check tranform = GetComponent(); - if(tranform == null) + if(!tranform) Debug.LogError("tranform is NULL!"); - //PickAndThrow check - pat = GetScript(); - if (pat == null) - Debug.LogError("PickAndThrow is NULL!"); - stateMachine = AddScript(); Dictionary dictionary = new Dictionary(); dictionary.Add(typeof(PlayerIdleState), new PlayerIdleState(stateMachine)); @@ -120,6 +115,14 @@ public class PlayerController : Script protected override void update() { + //PickAndThrow check + if (!pat) + { + pat = GetScript(); + if(!pat) + Debug.LogError("PickAndThrow is NULL!"); + } + if (!cam) cam = GetComponentInChildren(); if(!camArm) diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index 98d2ca23..2301a2a1 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -6,17 +6,16 @@ public class GameManager : Script { public enum GameState { - MAINMENU, START, WIN, - LOSE, - TOTAL + LOSE } public GameObject itemPool; public GameObject zonePool; - public GameState currGameState; + [NonSerialized] + public GameState currGameState; [NonSerialized] public int totalItemCount; [NonSerialized] @@ -31,7 +30,7 @@ public class GameManager : Script { totalItemCount = 0; Score = 0; - currGameState = GameState.MAINMENU; + currGameState = GameState.START; if (itemPool) { diff --git a/Assets/Scripts/SC_MainMenu.cs b/Assets/Scripts/SC_MainMenu.cs index ff8c58dd..56579541 100644 --- a/Assets/Scripts/SC_MainMenu.cs +++ b/Assets/Scripts/SC_MainMenu.cs @@ -1,13 +1,17 @@ using System; using SHADE; -public class SC_MainMenu : Script +public class MainMenu : Script { protected override void awake() { } protected override void update() { + if (Input.GetKey(Input.KeyCode.Space)) + { + SceneManager.ChangeScene(86098106); + } } } diff --git a/SHADE_Managed/src/Scene/SceneManager.hxx b/SHADE_Managed/src/Scene/SceneManager.hxx index e1b30bc3..e1e1ec0a 100644 --- a/SHADE_Managed/src/Scene/SceneManager.hxx +++ b/SHADE_Managed/src/Scene/SceneManager.hxx @@ -21,6 +21,7 @@ namespace SHADE { public ref class SceneManager abstract sealed { - static void ChangeScene(AssetID sceneAssetID); + public : + static void ChangeScene(AssetID sceneAssetID); }; }