From ab92d56cf06a47f94e2bed1f4abfaff9a3102d80 Mon Sep 17 00:00:00 2001 From: Glence Date: Wed, 1 Mar 2023 00:51:57 +0800 Subject: [PATCH 01/11] disable movement when pop out is in place --- Assets/Scenes/Level1.shade | 12 ++-- Assets/Scenes/Level2.shade | 57 ++++++++++++++-- .../Gameplay/Player/SC_PickAndThrow.cs | 33 +--------- .../Gameplay/Player/SC_PlayerController.cs | 65 ++++++++++--------- .../Gameplay/Player/SC_ThirdPersonCamera.cs | 2 +- Assets/Scripts/Gameplay/SC_GameManager.cs | 3 + Assets/Scripts/UI/SC_PauseMenu.cs | 2 +- Assets/Scripts/UI/SC_StealFoodPopUp.cs | 1 + 8 files changed, 102 insertions(+), 73 deletions(-) diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index e06548c0..5d611b34 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -4530,7 +4530,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -4581,7 +4581,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -4632,7 +4632,7 @@ Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: true + Interpolate: false Sleeping Enabled: true Freeze Position X: false Freeze Position Y: false @@ -5090,7 +5090,7 @@ Interpolate: false Sleeping Enabled: true Freeze Position X: false - Freeze Position Y: true + Freeze Position Y: false Freeze Position Z: false Freeze Rotation X: true Freeze Rotation Y: true @@ -5124,6 +5124,8 @@ lightMultiper: 0.75 mediumMultiper: 0.5 heavyMultiper: 0.25 + silhouettePlayer: 462 + silhouetteBag: 465 - Type: PickAndThrow Enabled: true throwForce: [8, 10, 8] @@ -5131,8 +5133,6 @@ delayTimer: 1 aimingLength: 0.899999976 throwItem: false - silhouettePlayer: 462 - silhouetteBag: 465 rayDistance: 0.5 rayHeight: 0.100000001 aimingFOV: 50 diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index 47b32e34..3caea55a 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -2321,7 +2321,7 @@ Interpolate: false Sleeping Enabled: true Freeze Position X: false - Freeze Position Y: true + Freeze Position Y: false Freeze Position Z: false Freeze Rotation X: true Freeze Rotation Y: true @@ -2355,6 +2355,8 @@ lightMultiper: 0.899999976 mediumMultiper: 0.699999988 heavyMultiper: 0.5 + silhouettePlayer: 462 + silhouetteBag: 465 - Type: PickAndThrow Enabled: true throwForce: [10, 8, 10] @@ -2362,8 +2364,6 @@ delayTimer: 1 aimingLength: 1 throwItem: false - silhouettePlayer: 462 - silhouetteBag: 465 rayDistance: 0.75 rayHeight: 0.100000001 aimingFOV: 50 @@ -4782,7 +4782,7 @@ - Type: JumpPad Enabled: true - EID: 10 - Name: Canvas + Name: PauseCanvas IsActive: true NumberOfChildren: 3 Components: @@ -13297,4 +13297,51 @@ Mesh: 136373407 Material: 131956078 IsActive: true - Scripts: ~ \ No newline at end of file + Scripts: ~ +- EID: 174 + Name: TweenManager + IsActive: true + NumberOfChildren: 0 + Components: ~ + Scripts: + - Type: SHADE_Scripting.UI.TweenManager + Enabled: true +- EID: 172 + Name: StealFoodCanvas + IsActive: true + NumberOfChildren: 1 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: ~ +- EID: 173 + Name: StealFoodLogo + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 0, y: 0, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 127459277 + IsActive: true + UI Component: + Canvas ID: 172 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.StealFoodPopUp + Enabled: true + popInDuration: 0.5 + popOutDuration: 0.5 + stayDuration: 1 + rotationAmt: 1800 + scaleAmtX: 538 + scaleAmtY: 377 \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs b/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs index 2de54025..1dcc0394 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs @@ -28,11 +28,6 @@ public class PickAndThrow : Script public bool throwItem = false; private Vector3 prevTargetOffSet; - public GameObject silhouettePlayer; - public Renderable silhouettePlayerRend; - public GameObject silhouetteBag; - public Renderable silhouetteBagRend; - [Tooltip("Lenght of ray")] public float rayDistance = 1; @@ -58,41 +53,17 @@ public class PickAndThrow : Script if(!tpc) Debug.LogError("TPC EMPTY"); - if(!silhouettePlayer) - Debug.LogError("silhouettePlayer EMPTY"); - else - silhouettePlayerRend = silhouettePlayer.GetComponent(); - - if (!silhouetteBag) - Debug.LogError("silhouetteBag EMPTY"); - else - silhouetteBagRend = silhouetteBag.GetComponent(); - AudioHandler.audioClipHandlers["SFXThrow"] = Audio.CreateAudioClip("event:/Raccoon/raccoon_throw"); timer = delayTimer; } protected override void update() { - if (GameManager.Instance.GamePause) + if (GameManager.Instance.GamePause || GameManager.Instance.stealFoodPopUp) { return; } - if (silhouettePlayerRend && silhouetteBagRend) - { - //wait for daniel - //0.00075f; - Vector3 dis = Camera.GetMainCamera().Position - GameObject.GetComponent().LocalPosition; - float disSqr = dis.GetSqrMagnitude(); - float ratio = System.Math.Clamp(1 - (disSqr / (1 + disSqr)), 0, 1.0f); - float temp = (1 - ratio) * 0.00075f; - if (temp <= 0.0006f) - temp = 0.1f; - silhouettePlayerRend.Material.SetProperty("data.offset", temp); - silhouetteBagRend.Material.SetProperty("data.offset", temp); - } - if (timer <= delayTimer) timer += Time.DeltaTimeF; @@ -171,7 +142,7 @@ public class PickAndThrow : Script protected override void fixedUpdate() { - if (GameManager.Instance.GamePause) + if (GameManager.Instance.GamePause || GameManager.Instance.stealFoodPopUp) { return; } diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index 87e42032..917d1f98 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -17,15 +17,6 @@ public class PlayerController : Script TOTAL } -/* public enum WalkingState - { - CARRY, - AIMING, - THROW, - WALK, - TOTAL - }*/ - public RigidBody rb { get; set; } public Transform tranform { get; set; } public Camera cam { get; set; } @@ -85,6 +76,12 @@ public class PlayerController : Script [Tooltip("How heavy item will affect player jump")] public float heavyMultiper = 0.25f; + //silhouette===================================================================== + public GameObject silhouettePlayer; + public Renderable silhouettePlayerRend; + public GameObject silhouetteBag; + public Renderable silhouetteBagRend; + protected override void awake() { //default setup @@ -119,6 +116,21 @@ public class PlayerController : Script dictionary.Add(typeof(PlayerCaughtState), new PlayerCaughtState(stateMachine)); stateMachine.InitStateMachine(dictionary); + if (!silhouettePlayer) + Debug.LogError("silhouettePlayer EMPTY"); + else + { + silhouettePlayerRend = silhouettePlayer.GetComponent(); + silhouettePlayerRend.Material.SetProperty("data.offset", 0.1f); + } + + if (!silhouetteBag) + Debug.LogError("silhouetteBag EMPTY"); + else + { + silhouetteBagRend = silhouetteBag.GetComponent(); + silhouetteBagRend.Material.SetProperty("data.offset", 0.1f); + } } protected override void lateUpdate() @@ -127,26 +139,23 @@ public class PlayerController : Script protected override void update() { - if (GameManager.Instance.GamePause) + if (GameManager.Instance.GamePause || GameManager.Instance.stealFoodPopUp) { return; } - if (delayTimer <= 1) - delayTimer += Time.DeltaTimeF; + if (silhouettePlayerRend && silhouetteBagRend) + { + Vector3 dis = Camera.GetMainCamera().Position - GameObject.GetComponent().LocalPosition; + float disSqr = dis.GetSqrMagnitude(); + float ratio = System.Math.Clamp(1 - (disSqr / (1 + disSqr)), 0, 1.0f); + float temp = (1 - ratio) * 0.00075f; + if (temp <= 0.0006f) + temp = 0.1f; + silhouettePlayerRend.Material.SetProperty("data.offset", temp); + silhouetteBagRend.Material.SetProperty("data.offset", temp); + } - if (delayTimer < 1) - { - if (tranform && respawnPoint && rb) - { - rb.LinearVelocity = Vector3.Zero; - tranform.LocalPosition = respawnPoint.GetComponent().LocalPosition; - } - } - else - { - rb.FreezePositionY = false; - } //PickAndThrow check if (!pat) { @@ -160,9 +169,7 @@ public class PlayerController : Script if(!camArm) camArm = GetComponentInChildren(); - //tempFix - if (tranform) - tranform.LocalEulerAngles = new Vector3(0.0f, tranform.LocalEulerAngles.y, 0.0f); + GotCaught(); Rotation(); @@ -178,7 +185,7 @@ public class PlayerController : Script protected override void fixedUpdate() { - if (GameManager.Instance.GamePause) + if (GameManager.Instance.GamePause || GameManager.Instance.stealFoodPopUp) { return; } @@ -336,7 +343,7 @@ public class PlayerController : Script if (isMoveKeyPress && tranform && !isAiming) { Quaternion currentRotation = tranform.LocalRotation; - Quaternion targetRotation = Quaternion.LookRotation(new Vector3(axisMove.x, 0.0f, axisMove.y), new Vector3(0.0f, 1.0f, 0.0f)); + Quaternion targetRotation = Quaternion.LookRotation(new Vector3(axisMove.x, 0.0f, axisMove.y), Vector3.Up); tranform.LocalRotation = Quaternion.Slerp(currentRotation, targetRotation, rotationFactorPerFrame * (float)Time.FixedDeltaTime); } else if (camArm && tranform && isAiming) diff --git a/Assets/Scripts/Gameplay/Player/SC_ThirdPersonCamera.cs b/Assets/Scripts/Gameplay/Player/SC_ThirdPersonCamera.cs index b137609e..d135b32f 100644 --- a/Assets/Scripts/Gameplay/Player/SC_ThirdPersonCamera.cs +++ b/Assets/Scripts/Gameplay/Player/SC_ThirdPersonCamera.cs @@ -41,7 +41,7 @@ namespace SHADE_Scripting protected override void update() { - if (GameManager.Instance.GamePause) + if (GameManager.Instance.GamePause || GameManager.Instance.stealFoodPopUp) { return; } diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index 1cebe002..fde9b753 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -40,6 +40,7 @@ public class GameManager : Script public static GameManager Instance { get; private set; } public bool GamePause { get; set; } + public bool stealFoodPopUp { get; set; } public bool itemShatter { get; set; } @@ -58,6 +59,8 @@ public class GameManager : Script currMultiplierDuration = 0; fontScalar = new Vector3(multiplierFont / maxMultiplierDuration, multiplierFont / maxMultiplierDuration , multiplierFont / maxMultiplierDuration); itemShatter = false; + GamePause = false; + stealFoodPopUp = true; AudioHandler.audioClipHandlers["BGMWin"] = Audio.CreateAudioClip("event:/Music/stingers/game_win"); AudioHandler.audioClipHandlers["BGMLose"] = Audio.CreateAudioClip("event:/Music/stingers/game_lose"); diff --git a/Assets/Scripts/UI/SC_PauseMenu.cs b/Assets/Scripts/UI/SC_PauseMenu.cs index 521b48ea..6820e2d2 100644 --- a/Assets/Scripts/UI/SC_PauseMenu.cs +++ b/Assets/Scripts/UI/SC_PauseMenu.cs @@ -86,7 +86,7 @@ public class PauseMenu : Script protected override void update() { - if (Input.GetKeyDown(Input.KeyCode.Escape) && !GameManager.Instance.GamePause) + if (Input.GetKeyDown(Input.KeyCode.Escape) && !GameManager.Instance.GamePause && !GameManager.Instance.stealFoodPopUp) { GameManager.Instance.GamePause = true; AudioHandler.pauseAllSounds(true); diff --git a/Assets/Scripts/UI/SC_StealFoodPopUp.cs b/Assets/Scripts/UI/SC_StealFoodPopUp.cs index 59b97e7d..60bec589 100644 --- a/Assets/Scripts/UI/SC_StealFoodPopUp.cs +++ b/Assets/Scripts/UI/SC_StealFoodPopUp.cs @@ -79,6 +79,7 @@ namespace SHADE_Scripting.UI if (scaleOutX.IsCompleted() && scaleOutY.IsCompleted()) { GameObject.SetActive(false); + GameManager.Instance.stealFoodPopUp = false; } } } From d5c9010661f8f7b8ddee7611ae7dd72272809a13 Mon Sep 17 00:00:00 2001 From: Glence Date: Wed, 1 Mar 2023 01:16:34 +0800 Subject: [PATCH 02/11] Clean up the scenes --- Assets/Scenes/Level1.shade | 176 ++++++++++++++++-- Assets/Scenes/Level2.shade | 8 +- .../Gameplay/Player/SC_PlayerController.cs | 4 + 3 files changed, 164 insertions(+), 24 deletions(-) diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index 5d611b34..f5cabbfb 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -4284,7 +4284,7 @@ - EID: 199 Name: =====Text==== IsActive: true - NumberOfChildren: 3 + NumberOfChildren: 4 Components: ~ Scripts: ~ - EID: 237 @@ -4293,7 +4293,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -800, y: 400, z: 0} + Translate: {x: -800, y: 400, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 60, y: 60, z: 60} IsActive: true @@ -4308,7 +4308,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 500, y: 400, z: 0} + Translate: {x: 500, y: 400, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 60, y: 60, z: 60} IsActive: true @@ -4323,15 +4323,30 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -800, y: 300, z: 0} + Translate: {x: -800, y: 300, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 60, y: 60, z: 60} IsActive: true Text Renderer Component: - Text: TEST + Text: "" Font: 176667660 IsActive: true Scripts: ~ +- EID: 454 + Name: GamePause + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -250, y: 300, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 100, y: 100, z: 100} + IsActive: true + Text Renderer Component: + Text: Game Pause + Font: 176667660 + IsActive: false + Scripts: ~ - EID: 236 Name: ====GameManager==== IsActive: true @@ -4352,6 +4367,13 @@ maxMultiplierDuration: 5 maxMultiplierCombo: 10 multiplierFont: 60 + - Type: PauseMenu + Enabled: true + resumeBtn: 457 + retryBtn: 455 + quitBtn: 456 + gamePauseText: 454 + canvas: 458 - EID: 235 Name: ====AI===== IsActive: true @@ -5120,20 +5142,20 @@ maxJumpHeight: 2 maxJumpTime: 0.75 fallMultipler: 3 - jumpPadMultiplayer: 2 - lightMultiper: 0.75 - mediumMultiper: 0.5 - heavyMultiper: 0.25 + jumpPadMultiplayer: 1.20000005 + lightMultiper: 0.899999976 + mediumMultiper: 0.699999988 + heavyMultiper: 0.5 silhouettePlayer: 462 silhouetteBag: 465 - Type: PickAndThrow Enabled: true throwForce: [8, 10, 8] - cameraArmOffSet: [0, 0.25, 0] + cameraArmOffSet: [0.25, 0.600000024, 0.200000003] delayTimer: 1 - aimingLength: 0.899999976 + aimingLength: 1 throwItem: false - rayDistance: 0.5 + rayDistance: 0.75 rayHeight: 0.100000001 aimingFOV: 50 defaultFOV: 45 @@ -5167,24 +5189,24 @@ Near: 0.00999999978 Far: 10000 Perspective: true - FOV: 90 + FOV: 45 IsActive: true Camera Arm Component: Arm Pitch: 0 Arm Yaw: 0 Arm Length: 1 Look At Camera Origin: true - Target Offset: {x: 0, y: 0, z: 0} + Target Offset: {x: 0, y: 0.75, z: 0} Camera Collision: true IsActive: true Scripts: - Type: SHADE_Scripting.ThirdPersonCamera Enabled: true - armLength: 2 - turnSpeedPitch: 0.300000012 - turnSpeedYaw: 0.5 - inverseXControls: true - inverseYControls: true + armLength: 3 + turnSpeedPitch: 0.200000003 + turnSpeedYaw: 0.400000006 + inverseXControls: false + inverseYControls: false pitchUpperClamp: 45 pitchLowerClamp: 5 - EID: 65731 @@ -5289,4 +5311,118 @@ Components: ~ Scripts: - Type: SHADE_Scripting.UI.TweenManager - Enabled: true \ No newline at end of file + Enabled: true +- EID: 461 + Name: CameraPoints + IsActive: true + NumberOfChildren: 0 + Components: ~ + Scripts: ~ +- EID: 459 + Name: PreviewLevelCamera + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Camera Component: + Position: {x: 0, y: 0, z: 0} + Pitch: 0 + Yaw: 0 + Roll: 0 + Width: 1920 + Near: 0.00999999978 + Far: 10000 + Perspective: true + FOV: 90 + IsActive: true + Scripts: ~ +- EID: 458 + Name: PauseCanvas + IsActive: true + NumberOfChildren: 3 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: ~ +- EID: 457 + Name: ResumeButton + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 100, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 300, y: 200, z: 500} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 129340704 + IsActive: true + Button Component: + Default Texture: 52901020 + Hovered Texture: 62235279 + Clicked Texture: 64722619 + IsActive: true + UI Component: + Canvas ID: 458 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 456 + Name: QuitButton + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: -300, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 300, y: 200, z: 500} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 129340704 + IsActive: true + Button Component: + Default Texture: 66477839 + Hovered Texture: 65045286 + Clicked Texture: 58607560 + IsActive: true + UI Component: + Canvas ID: 458 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 455 + Name: RetryButton + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: -100, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 300, y: 200, z: 500} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 129340704 + IsActive: true + Button Component: + Default Texture: 55782622 + Hovered Texture: 58972174 + Clicked Texture: 55224464 + IsActive: true + UI Component: + Canvas ID: 458 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ \ No newline at end of file diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index 3caea55a..4ef311eb 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -2239,7 +2239,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -800, y: 400, z: 0} + Translate: {x: -800, y: 400, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 60, y: 60, z: 60} IsActive: true @@ -2254,7 +2254,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 500, y: 400, z: 0} + Translate: {x: 500, y: 400, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 60, y: 60, z: 60} IsActive: true @@ -2269,7 +2269,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -800, y: 300, z: 0} + Translate: {x: -800, y: 300, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 60, y: 60, z: 60} IsActive: true @@ -2284,7 +2284,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -250, y: 300, z: 0} + Translate: {x: -250, y: 300, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 100, y: 100, z: 100} IsActive: true diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index 917d1f98..e27e6b5e 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -165,7 +165,11 @@ public class PlayerController : Script } if (!cam) + { cam = GetComponentInChildren(); + if(pat) + cam.FOV = pat.defaultFOV; + } if(!camArm) camArm = GetComponentInChildren(); From 403df62a0be393a195c525b398f4b51b6da42249 Mon Sep 17 00:00:00 2001 From: Glence Date: Wed, 1 Mar 2023 18:05:42 +0800 Subject: [PATCH 03/11] cleaning up scenes and WIP for previewlevel camera --- Assets/Scenes/Level1.shade | 285 +--- Assets/Scenes/Level2.shade | 1353 ++++++++++++++++++- Assets/Scenes/Level3.shade | 1399 +++++++++++++++++++- Assets/Scripts/Gameplay/SC_PreviewLevel.cs | 47 + Assets/Scripts/UI/SC_Cutscene.cs | 18 +- Assets/Scripts/UI/SC_PauseMenu.cs | 12 +- 6 files changed, 2790 insertions(+), 324 deletions(-) create mode 100644 Assets/Scripts/Gameplay/SC_PreviewLevel.cs diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index f5cabbfb..be64bcdc 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -521,47 +521,11 @@ - Is Trigger: false Collision Tag: 0 Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Half Extents: {x: 1.10000002, y: 2, z: 0.550000012} Friction: 0.400000006 Bounciness: 0 Density: 1 - Position Offset: {x: 0, y: 0.0299999993, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.5, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.985000014, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 1.47500002, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 1.97000003, z: 0} + Position Offset: {x: 0, y: 1, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ @@ -584,47 +548,11 @@ - Is Trigger: false Collision Tag: 0 Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Half Extents: {x: 1.10000002, y: 2, z: 0.550000012} Friction: 0.400000006 Bounciness: 0 Density: 1 - Position Offset: {x: 0, y: 0.0299999993, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.5, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.985000014, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 1.47500002, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 1.97000003, z: 0} + Position Offset: {x: 0, y: 1, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ @@ -647,47 +575,11 @@ - Is Trigger: false Collision Tag: 0 Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Half Extents: {x: 1.10000002, y: 2, z: 0.550000012} Friction: 0.400000006 Bounciness: 0 Density: 1 - Position Offset: {x: 0, y: 0.0299999993, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.5, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.985000014, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 1.47500002, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 1.97000003, z: 0} + Position Offset: {x: 0, y: 1, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ @@ -836,47 +728,11 @@ - Is Trigger: false Collision Tag: 0 Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Half Extents: {x: 1.10000002, y: 2, z: 0.550000012} Friction: 0.400000006 Bounciness: 0 Density: 1 - Position Offset: {x: 0, y: 0.0299999993, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.5, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.985000014, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 1.47500002, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 1.97000003, z: 0} + Position Offset: {x: 0, y: 1, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ @@ -962,47 +818,11 @@ - Is Trigger: false Collision Tag: 0 Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} + Half Extents: {x: 1.10000002, y: 2, z: 0.550000012} Friction: 0.400000006 Bounciness: 0 Density: 1 - Position Offset: {x: 0, y: 0.0299999993, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.5, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.985000014, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 1.47500002, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - - Is Trigger: false - Collision Tag: 0 - Type: Box - Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 1.97000003, z: 0} + Position Offset: {x: 0, y: 1, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ @@ -2583,7 +2403,7 @@ Components: Transform Component: Translate: {x: 0, y: 0, z: 0} - Rotate: {x: -1.48352981, y: 0, z: 0} + Rotate: {x: 0, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: @@ -4284,7 +4104,7 @@ - EID: 199 Name: =====Text==== IsActive: true - NumberOfChildren: 4 + NumberOfChildren: 3 Components: ~ Scripts: ~ - EID: 237 @@ -4332,21 +4152,6 @@ Font: 176667660 IsActive: true Scripts: ~ -- EID: 454 - Name: GamePause - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -250, y: 300, z: 0.100000001} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 100, y: 100, z: 100} - IsActive: true - Text Renderer Component: - Text: Game Pause - Font: 176667660 - IsActive: false - Scripts: ~ - EID: 236 Name: ====GameManager==== IsActive: true @@ -4372,7 +4177,6 @@ resumeBtn: 457 retryBtn: 455 quitBtn: 456 - gamePauseText: 454 canvas: 458 - EID: 235 Name: ====AI===== @@ -4407,7 +4211,7 @@ - Is Trigger: false Collision Tag: 5 Type: Box - Half Extents: {x: 1, y: 1.79999995, z: 0.400000006} + Half Extents: {x: 0.600000024, y: 1.79999995, z: 0.400000006} Friction: 0.400000006 Bounciness: 0 Density: 1 @@ -5192,8 +4996,8 @@ FOV: 45 IsActive: true Camera Arm Component: - Arm Pitch: 0 - Arm Yaw: 0 + Arm Pitch: 45 + Arm Yaw: -90 Arm Length: 1 Look At Camera Origin: true Target Offset: {x: 0, y: 0.75, z: 0} @@ -5299,7 +5103,7 @@ - Type: SHADE_Scripting.UI.StealFoodPopUp Enabled: true popInDuration: 0.5 - popOutDuration: 0.5 + popOutDuration: 0.075000003 stayDuration: 1 rotationAmt: 1800 scaleAmtX: 538 @@ -5315,9 +5119,42 @@ - EID: 461 Name: CameraPoints IsActive: true - NumberOfChildren: 0 + NumberOfChildren: 3 Components: ~ Scripts: ~ +- EID: 453 + Name: PreviewLevel1 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -7.59216642, y: 1.49918437, z: -1.37255788} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Scripts: ~ +- EID: 452 + Name: PreviewLevel2 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -3.13806891, y: 1.33345056, z: -7.42731333} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Scripts: ~ +- EID: 451 + Name: PreviewLevel3 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 4.74025965, y: 1.62911224, z: -7.82088184} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Scripts: ~ - EID: 459 Name: PreviewLevelCamera IsActive: true @@ -5343,7 +5180,7 @@ - EID: 458 Name: PauseCanvas IsActive: true - NumberOfChildren: 3 + NumberOfChildren: 4 Components: Canvas Component: Canvas Width: 1920 @@ -5425,4 +5262,24 @@ Hovered: false Clicked: false IsActive: true + Scripts: ~ +- EID: 454 + Name: GamePauseText + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -250, y: 300, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 100, y: 100, z: 100} + IsActive: true + Text Renderer Component: + Text: Game Pause + Font: 176667660 + IsActive: false + UI Component: + Canvas ID: 458 + Hovered: false + Clicked: false + IsActive: true Scripts: ~ \ No newline at end of file diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index 4ef311eb..89ca90ff 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -59,7 +59,7 @@ - EID: 240 Name: ====ItemPool==== IsActive: true - NumberOfChildren: 31 + NumberOfChildren: 35 Components: ~ Scripts: ~ - EID: 241 @@ -164,57 +164,6 @@ highlightSpeed: 300 highlightThickness: 250 highlightLowerClamp: 0.25 -- EID: 156 - Name: Mesh_Meat - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0.461924851, y: 0.988175511, z: -0.383091867} - Rotate: {x: -0, y: 0, z: -0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - Renderable Component: - Mesh: 136892700 - Material: 122370915 - IsActive: true - RigidBody Component: - Type: Dynamic - Drag: 0.00999999978 - Angular Drag: 0.100000001 - Use Gravity: true - Interpolate: false - 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 - Collision Tag: 2 - 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 - density: 1 - dontReturn: false - soundDistance: 10 - highlightSpeed: 300 - highlightThickness: 250 - highlightLowerClamp: 0.25 - EID: 155 Name: Mesh_Cheese IsActive: true @@ -476,8 +425,8 @@ NumberOfChildren: 4 Components: Transform Component: - Translate: {x: 3.11708331, y: 0.333341181, z: 6.14019775} - Rotate: {x: 0, y: 0, z: 0} + Translate: {x: 0.199520111, y: 1.25556076, z: 1.23466492} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999979734, y: 1, z: 0.999979734} IsActive: true Renderable Component: @@ -1664,8 +1613,8 @@ NumberOfChildren: 5 Components: Transform Component: - Translate: {x: 1.65356398, y: 0.333341181, z: 5.9183445} - Rotate: {x: 0, y: 0, z: 0} + Translate: {x: -3.26610065, y: 1.34320831, z: 4.47019911} + Rotate: {x: -0, y: 0, z: -0} Scale: {x: 0.999979734, y: 1, z: 0.999979734} IsActive: true Renderable Component: @@ -2070,6 +2019,1283 @@ highlightSpeed: 300 highlightThickness: 250 highlightLowerClamp: 0.25 +- EID: 522 + Name: Watermelon + IsActive: true + NumberOfChildren: 5 + Components: + Transform Component: + Translate: {x: 1.65356398, y: 0.333341181, z: 5.9183445} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 0.999979734, y: 1, z: 0.999979734} + IsActive: true + Renderable Component: + Mesh: 134305891 + Material: 122370915 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Sphere + Radius: 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: Breakable + Enabled: true + threshHold: 4 + ignoreRaccoon: true + - Type: Item + Enabled: true + Score: 500 + currCategory: 2 + density: 1 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 523 + Name: Piece1 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0218036175, y: 5.38527966e-05, z: 0.202852726} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 144023586 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.400000006, 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.164060935, y: 0, z: 0} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 524 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0812162161, y: 0.0825212598, z: -0.0991339684} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 142132679 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.300000012, 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.34906584} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 525 + Name: Piece3 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0350502729, y: -0.210244894, z: -0.0336794853} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 138231239 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.0799999982, 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.261799395} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 526 + Name: Piece4 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.230162144, y: -0.0580062866, z: -0.00789308548} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 135293480 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.0500000007, 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: -1.04719758} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 527 + Name: Piece5 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.129600644, y: 0.219047099, z: 0.0484838486} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 146157335 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.25, y: 0.0500000007, 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.436332315} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 131228 + Name: Watermelon + IsActive: true + NumberOfChildren: 5 + Components: + Transform Component: + Translate: {x: 0.623170555, y: 1.0488801, z: -0.65238905} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 0.999979734, y: 1, z: 0.999979734} + IsActive: true + Renderable Component: + Mesh: 134305891 + Material: 122370915 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Sphere + Radius: 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: Breakable + Enabled: true + threshHold: 4 + ignoreRaccoon: true + - Type: Item + Enabled: true + Score: 500 + currCategory: 2 + density: 1 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 66068 + Name: Piece1 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0218036175, y: 5.38527966e-05, z: 0.202852726} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 144023586 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.400000006, 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.164060935, y: 0, z: 0} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 66067 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0812162161, y: 0.0825212598, z: -0.0991339684} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 142132679 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.300000012, 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.34906584} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 66066 + Name: Piece3 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0350502729, y: -0.210244894, z: -0.0336794853} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 138231239 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.0799999982, 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.261799395} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 66065 + Name: Piece4 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.230162144, y: -0.0580062866, z: -0.00789308548} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 135293480 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.0500000007, 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: -1.04719758} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 66064 + Name: Piece5 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.129600644, y: 0.219047099, z: 0.0484838486} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 146157335 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.25, y: 0.0500000007, 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.436332315} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 533 + Name: Egg + IsActive: true + NumberOfChildren: 4 + Components: + Transform Component: + Translate: {x: 3.11708331, y: 0.333341181, z: 6.14019775} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 0.999979734, y: 1, z: 0.999979734} + IsActive: true + Renderable Component: + Mesh: 147457317 + Material: 122370915 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Sphere + Radius: 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: Breakable + Enabled: true + threshHold: 0.5 + ignoreRaccoon: true + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 2 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 534 + Name: Piece1 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0224030018, y: 0.0607728958, z: -0.00627422333} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 134900190 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0.164060935, y: 0, z: 0} + IsActive: false + Scripts: ~ +- EID: 535 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.00627422333, y: 0.0337567925, z: -0.00243234634} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 146271645 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -0.34906584} + IsActive: false + Scripts: ~ +- EID: 536 + Name: Piece3 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0166685581, y: -0.0367090404, z: 0.0114421844} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 135945648 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -0.261799395} + IsActive: false + Scripts: ~ +- EID: 537 + Name: Piece4 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.020128727, y: -0.0155199468, z: -0.0045747757} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 141722646 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -1.04719758} + IsActive: false + Scripts: ~ +- EID: 538 + Name: Egg + IsActive: true + NumberOfChildren: 4 + Components: + Transform Component: + Translate: {x: -0.272738755, y: 1.24863148, z: -4.62824583} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 0.999979734, y: 1, z: 0.999979734} + IsActive: true + Renderable Component: + Mesh: 147457317 + Material: 122370915 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Sphere + Radius: 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: Breakable + Enabled: true + threshHold: 0.5 + ignoreRaccoon: true + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 2 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 539 + Name: Piece1 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0224030018, y: 0.0607728958, z: -0.00627422333} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 134900190 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0.164060935, y: 0, z: 0} + IsActive: false + Scripts: ~ +- EID: 540 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.00627422333, y: 0.0337567925, z: -0.00243234634} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 146271645 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -0.34906584} + IsActive: false + Scripts: ~ +- EID: 541 + Name: Piece3 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0166685581, y: -0.0367090404, z: 0.0114421844} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 135945648 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -0.261799395} + IsActive: false + Scripts: ~ +- EID: 542 + Name: Piece4 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.020128727, y: -0.0155199468, z: -0.0045747757} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 141722646 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -1.04719758} + IsActive: false + Scripts: ~ +- EID: 66079 + Name: Egg + IsActive: true + NumberOfChildren: 4 + Components: + Transform Component: + Translate: {x: -1.86591768, y: 0.84575963, z: -1.40127254} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 0.999979734, y: 1, z: 0.999979734} + IsActive: true + Renderable Component: + Mesh: 147457317 + Material: 122370915 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Sphere + Radius: 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: Breakable + Enabled: true + threshHold: 0.5 + ignoreRaccoon: true + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 2 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 66083 + Name: Piece1 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0224030018, y: 0.0607728958, z: -0.00627422333} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 134900190 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0.164060935, y: 0, z: 0} + IsActive: false + Scripts: ~ +- EID: 66082 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.00627422333, y: 0.0337567925, z: -0.00243234634} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 146271645 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -0.34906584} + IsActive: false + Scripts: ~ +- EID: 66081 + Name: Piece3 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0166685581, y: -0.0367090404, z: 0.0114421844} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 135945648 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -0.261799395} + IsActive: false + Scripts: ~ +- EID: 66080 + Name: Piece4 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.020128727, y: -0.0155199468, z: -0.0045747757} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 141722646 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -1.04719758} + IsActive: false + Scripts: ~ - EID: 15 Name: ====ScoreZonePool==== IsActive: true @@ -2225,7 +3451,6 @@ resumeBtn: 8 retryBtn: 461 quitBtn: 0 - gamePauseText: 11 canvas: 10 - EID: 199 Name: =====Text==== @@ -2306,7 +3531,7 @@ Components: Transform Component: Translate: {x: 2.35245037, y: 0.38365531, z: 7.10571432} - Rotate: {x: 0, y: 0.326376587, z: 0.0698131472} + Rotate: {x: 0, y: 0, z: 0} Scale: {x: 0.999999881, y: 1, z: 0.999999881} IsActive: true Renderable Component: @@ -2386,7 +3611,7 @@ Components: Transform Component: Translate: {x: 0, y: -5.96046448e-08, z: 0} - Rotate: {x: 0, y: 5.95680904, z: -0.0698131248} + Rotate: {x: 0, y: 6.28318548, z: 2.23517329e-08} Scale: {x: 1, y: 1, z: 1} IsActive: true Camera Component: @@ -2394,14 +3619,14 @@ Pitch: 0 Yaw: 360 Roll: 1.28065994e-06 - Width: 1055 + Width: 1920 Near: 0.00999999978 Far: 10000 Perspective: true FOV: 45 IsActive: true Camera Arm Component: - Arm Pitch: 0 + Arm Pitch: 20 Arm Yaw: 0 Arm Length: 3 Look At Camera Origin: true @@ -4659,7 +5884,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 0, z: -2.61272359} + Translate: {x: 0.0576689839, y: 0, z: -2.61272359} Rotate: {x: -0, y: 0, z: -0} Scale: {x: 1, y: 1, z: 1} IsActive: true @@ -4686,7 +5911,7 @@ - Is Trigger: false Collision Tag: 5 Type: Box - Half Extents: {x: 1, y: 1.79999995, z: 0.400000006} + Half Extents: {x: 0.600000024, y: 1.79999995, z: 0.400000006} Friction: 0.400000006 Bounciness: 0 Density: 1 @@ -13340,7 +14565,7 @@ - Type: SHADE_Scripting.UI.StealFoodPopUp Enabled: true popInDuration: 0.5 - popOutDuration: 0.5 + popOutDuration: 0.075000003 stayDuration: 1 rotationAmt: 1800 scaleAmtX: 538 diff --git a/Assets/Scenes/Level3.shade b/Assets/Scenes/Level3.shade index a71673a4..a13eccb7 100644 --- a/Assets/Scenes/Level3.shade +++ b/Assets/Scenes/Level3.shade @@ -4974,7 +4974,7 @@ - EID: 358 Name: Food IsActive: true - NumberOfChildren: 23 + NumberOfChildren: 20 Components: Transform Component: Translate: {x: 0, y: 0, z: 0} @@ -4997,21 +4997,6 @@ Material: 131956078 IsActive: true Scripts: ~ -- EID: 382 - Name: Food_Cheese - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 12.1188478, y: 2.36368299, z: 0.0781341419} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - Renderable Component: - Mesh: 141841143 - Material: 131956078 - IsActive: true - Scripts: ~ - EID: 381 Name: Food_Apple IsActive: true @@ -5267,21 +5252,6 @@ Material: 131956078 IsActive: true Scripts: ~ -- EID: 360 - Name: Food_Apple - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 4.25191593, y: 2.21991086, z: 10.735425} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - Renderable Component: - Mesh: 144128170 - Material: 131956078 - IsActive: true - Scripts: ~ - EID: 359 Name: Food_Apple IsActive: true @@ -5312,18 +5282,1371 @@ Material: 131956078 IsActive: true Scripts: ~ -- EID: 356 - Name: Food_Cheese +- EID: 383 + Name: Egg IsActive: true + NumberOfChildren: 4 + Components: + Transform Component: + Translate: {x: 4.23315954, y: 2.22085261, z: 10.7622595} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 0.999979734, y: 1, z: 0.999979734} + IsActive: true + Renderable Component: + Mesh: 147457317 + Material: 122370915 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Sphere + Radius: 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: Breakable + Enabled: true + threshHold: 0.5 + ignoreRaccoon: true + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 2 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 380 + Name: Piece1 + IsActive: false NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 4.25000906, y: 2.28261352, z: 8.01108646} - Rotate: {x: 0, y: 0, z: 0} + Translate: {x: 0.0224030018, y: 0.0607728958, z: -0.00627422333} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 134900190 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0.164060935, y: 0, z: 0} + IsActive: false + Scripts: ~ +- EID: 375 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.00627422333, y: 0.0337567925, z: -0.00243234634} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 146271645 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -0.34906584} + IsActive: false + Scripts: ~ +- EID: 367 + Name: Piece3 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0166685581, y: -0.0367090404, z: 0.0114421844} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 135945648 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -0.261799395} + IsActive: false + Scripts: ~ +- EID: 361 + Name: Piece4 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.020128727, y: -0.0155199468, z: -0.0045747757} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 141722646 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -1.04719758} + IsActive: false + Scripts: ~ +- EID: 464 + Name: Watermelon + IsActive: true + NumberOfChildren: 5 + Components: + Transform Component: + Translate: {x: 5.70615864, y: 0.288550973, z: 2.10129833} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 0.999979734, y: 1, z: 0.999979734} IsActive: true Renderable Component: - Mesh: 141841143 - Material: 131956078 + Mesh: 134305891 + Material: 122370915 IsActive: true - Scripts: ~ \ No newline at end of file + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Sphere + Radius: 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: Breakable + Enabled: true + threshHold: 4 + ignoreRaccoon: true + - Type: Item + Enabled: true + Score: 500 + currCategory: 2 + density: 1 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 463 + Name: Piece1 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0218036175, y: 5.38527966e-05, z: 0.202852726} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 144023586 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.400000006, 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.164060935, y: 0, z: 0} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 466 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0812162161, y: 0.0825212598, z: -0.0991339684} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 142132679 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.300000012, 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.34906584} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 467 + Name: Piece3 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0350502729, y: -0.210244894, z: -0.0336794853} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 138231239 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.0799999982, 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.261799395} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 468 + Name: Piece4 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.230162144, y: -0.0580062866, z: -0.00789308548} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 135293480 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.0500000007, 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: -1.04719758} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 469 + Name: Piece5 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.129600644, y: 0.219047099, z: 0.0484838486} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 146157335 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.25, y: 0.0500000007, 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.436332315} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 65892 + Name: Watermelon + IsActive: true + NumberOfChildren: 5 + Components: + Transform Component: + Translate: {x: 4.2424674, y: 2.40468884, z: 7.96858072} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 0.999979734, y: 1, z: 0.999979734} + IsActive: true + Renderable Component: + Mesh: 134305891 + Material: 122370915 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Sphere + Radius: 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: Breakable + Enabled: true + threshHold: 4 + ignoreRaccoon: true + - Type: Item + Enabled: true + Score: 500 + currCategory: 2 + density: 1 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 465 + Name: Piece1 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0218036175, y: 5.38527966e-05, z: 0.202852726} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 144023586 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.400000006, 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.164060935, y: 0, z: 0} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 462 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0812162161, y: 0.0825212598, z: -0.0991339684} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 142132679 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.300000012, 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.34906584} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 461 + Name: Piece3 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0350502729, y: -0.210244894, z: -0.0336794853} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 138231239 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.0799999982, 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.261799395} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 460 + Name: Piece4 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.230162144, y: -0.0580062866, z: -0.00789308548} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 135293480 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.0500000007, 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: -1.04719758} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 459 + Name: Piece5 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.129600644, y: 0.219047099, z: 0.0484838486} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 146157335 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.25, y: 0.0500000007, 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.436332315} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 65918 + Name: Egg + IsActive: true + NumberOfChildren: 4 + Components: + Transform Component: + Translate: {x: -0.630749702, y: 1.00790954, z: 1.41826737} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 0.999979734, y: 1, z: 0.999979734} + IsActive: true + Renderable Component: + Mesh: 147457317 + Material: 122370915 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Sphere + Radius: 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: Breakable + Enabled: true + threshHold: 0.5 + ignoreRaccoon: true + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 2 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 458 + Name: Piece1 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0224030018, y: 0.0607728958, z: -0.00627422333} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 134900190 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0.164060935, y: 0, z: 0} + IsActive: false + Scripts: ~ +- EID: 457 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.00627422333, y: 0.0337567925, z: -0.00243234634} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 146271645 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -0.34906584} + IsActive: false + Scripts: ~ +- EID: 456 + Name: Piece3 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0166685581, y: -0.0367090404, z: 0.0114421844} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 135945648 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -0.261799395} + IsActive: false + Scripts: ~ +- EID: 455 + Name: Piece4 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.020128727, y: -0.0155199468, z: -0.0045747757} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 141722646 + Material: 131956078 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 3 + Type: Box + Half Extents: {x: 0.0500000007, y: 0.0500000007, z: 0.0500000007} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Rotation Offset: {x: 0, y: 0, z: -1.04719758} + IsActive: false + Scripts: ~ +- EID: 65896 + Name: Watermelon + IsActive: true + NumberOfChildren: 5 + Components: + Transform Component: + Translate: {x: 12.1925201, y: 2.40468884, z: 0.196343422} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 0.999979734, y: 1, z: 0.999979734} + IsActive: true + Renderable Component: + Mesh: 134305891 + Material: 122370915 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Sphere + Radius: 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: Breakable + Enabled: true + threshHold: 4 + ignoreRaccoon: true + - Type: Item + Enabled: true + Score: 500 + currCategory: 2 + density: 1 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 454 + Name: Piece1 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0218036175, y: 5.38527966e-05, z: 0.202852726} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 144023586 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.400000006, 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.164060935, y: 0, z: 0} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 453 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.0812162161, y: 0.0825212598, z: -0.0991339684} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 142132679 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.300000012, 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.34906584} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 452 + Name: Piece3 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.0350502729, y: -0.210244894, z: -0.0336794853} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 138231239 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.0799999982, 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.261799395} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 451 + Name: Piece4 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.230162144, y: -0.0580062866, z: -0.00789308548} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 135293480 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.0500000007, 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: -1.04719758} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 +- EID: 450 + Name: Piece5 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -0.129600644, y: 0.219047099, z: 0.0484838486} + Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 146157335 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.25, y: 0.0500000007, 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.436332315} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/SC_PreviewLevel.cs b/Assets/Scripts/Gameplay/SC_PreviewLevel.cs new file mode 100644 index 00000000..c2e690a1 --- /dev/null +++ b/Assets/Scripts/Gameplay/SC_PreviewLevel.cs @@ -0,0 +1,47 @@ +using SHADE; +using System; +using System.Collections.Generic; +using System.Linq; + +public class PreviewLevel : Script +{ + public GameObject previewLevelPoints; + private List listOfpreviewLevelPoints; + + private Transform tran; + + public Vector3 endPoint1; + public Vector3 endPoint2; + public Vector3 endPoint3; + public float duration = 3.0f; + + private bool point1Done; + private bool point2Done; + private bool point3Done; + + protected override void awake() + { + //GetComponent().SetMainCamera(); + + if (previewLevelPoints) + listOfpreviewLevelPoints = previewLevelPoints.GetComponentsInChildren().ToList(); + else + Debug.LogError("MISSING PREVIEW POINTS"); + + if(listOfpreviewLevelPoints.Count == 0) + Debug.LogError("EMPTY PREVIEW POINTS"); + + tran = GetComponent(); + if (!tran) + Debug.LogError("MISSING PREVIEW TRANSFORM"); + else + tran.LocalPosition = listOfpreviewLevelPoints[0].LocalPosition; + + } + + protected override void update() + { + } + +} + diff --git a/Assets/Scripts/UI/SC_Cutscene.cs b/Assets/Scripts/UI/SC_Cutscene.cs index 4a6b2858..e5c6ca88 100644 --- a/Assets/Scripts/UI/SC_Cutscene.cs +++ b/Assets/Scripts/UI/SC_Cutscene.cs @@ -409,7 +409,11 @@ public class Cutscene : Script private void initCutscene1() { - listOfCutscene1Points = cutscene1Points.GetComponentsInChildren().ToList(); + if(cutscene1Points) + listOfCutscene1Points = cutscene1Points.GetComponentsInChildren().ToList(); + else + Debug.LogError("Cutscene1Points Missing"); + if (listOfCutscene1Points.Count == 0) Debug.LogError("Cutscene1Points Empty"); @@ -455,7 +459,11 @@ public class Cutscene : Script private void initCutscene2() { - listOfCutscene2Points = cutscene2Points.GetComponentsInChildren().ToList(); + if(cutscene2Points) + listOfCutscene2Points = cutscene2Points.GetComponentsInChildren().ToList(); + else + Debug.LogError("cutscene2Points Missing"); + if (listOfCutscene2Points.Count == 0) Debug.LogError("Cutscene2Points Empty"); @@ -503,7 +511,11 @@ public class Cutscene : Script private void initCutscene3() { - listOfCutscene3Points = cutscene3Points.GetComponentsInChildren().ToList(); + if(cutscene3Points) + listOfCutscene3Points = cutscene3Points.GetComponentsInChildren().ToList(); + else + Debug.LogError("cutscene3Points Missing"); + if (listOfCutscene3Points.Count == 0) Debug.LogError("Cutscene3Points Empty"); diff --git a/Assets/Scripts/UI/SC_PauseMenu.cs b/Assets/Scripts/UI/SC_PauseMenu.cs index 6820e2d2..451b5c64 100644 --- a/Assets/Scripts/UI/SC_PauseMenu.cs +++ b/Assets/Scripts/UI/SC_PauseMenu.cs @@ -8,16 +8,18 @@ public class PauseMenu : Script public GameObject retryBtn; public GameObject quitBtn; - public GameObject gamePauseText; + private TextRenderable gamePauseText; public GameObject canvas; protected override void awake() { GameManager.Instance.GamePause = false; - if (gamePauseText) - gamePauseText.GetComponent().Enabled = false; + if (canvas) + { + gamePauseText = canvas.GetComponentInChildren(); canvas.SetActive(false); + } if (!resumeBtn) Debug.LogError("Resume Btn missing"); @@ -41,7 +43,7 @@ public class PauseMenu : Script GameManager.Instance.GamePause = false; AudioHandler.pauseAllSounds(false); if (gamePauseText) - gamePauseText.GetComponent().Enabled = false; + gamePauseText.Enabled = false; if (canvas) canvas.SetActive(false); } @@ -91,7 +93,7 @@ public class PauseMenu : Script GameManager.Instance.GamePause = true; AudioHandler.pauseAllSounds(true); if (gamePauseText) - gamePauseText.GetComponent().Enabled = true; + gamePauseText.Enabled = true; if (canvas) canvas.SetActive(true); } From 2af19baccd46e481e607a81e60d560fc713a7a9c Mon Sep 17 00:00:00 2001 From: Glence Date: Thu, 2 Mar 2023 00:02:18 +0800 Subject: [PATCH 04/11] Added the transition back to the scene --- Assets/Scenes/Level1.shade | 44 +++++++++++++++++-- Assets/Scenes/Level2.shade | 44 +++++++++++++++++-- .../Gameplay/Player/SC_PlayerController.cs | 2 + Assets/Scripts/Gameplay/SC_GameManager.cs | 9 +++- .../Gameplay/SC_PreviewLevel.cs.shmeta | 3 ++ Assets/Scripts/UI/SC_StealFoodPopUp.cs | 8 +++- 6 files changed, 99 insertions(+), 11 deletions(-) create mode 100644 Assets/Scripts/Gameplay/SC_PreviewLevel.cs.shmeta diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index be64bcdc..1dd30cd9 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -4901,7 +4901,7 @@ Components: Transform Component: Translate: {x: -8, y: 1.142977, z: -4} - Rotate: {x: -0, y: 0, z: -0} + Rotate: {x: -0, y: 1.57079637, z: -0} Scale: {x: 0.999999881, y: 1, z: 0.999999881} IsActive: true Renderable Component: @@ -4981,7 +4981,7 @@ Components: Transform Component: Translate: {x: 0, y: -2.98023224e-08, z: 4.76837158e-07} - Rotate: {x: 0, y: 6.28318548, z: 2.23517329e-08} + Rotate: {x: 0, y: 4.71238899, z: 2.23517329e-08} Scale: {x: 1, y: 1, z: 1} IsActive: true Camera Component: @@ -5070,7 +5070,7 @@ IsActive: true Scripts: ~ - EID: 464 - Name: Canvas + Name: StealFoodCanvas IsActive: true NumberOfChildren: 1 Components: @@ -5282,4 +5282,40 @@ Hovered: false Clicked: false IsActive: true - Scripts: ~ \ No newline at end of file + Scripts: ~ +- EID: 450 + Name: TransitionCanvas + IsActive: true + NumberOfChildren: 1 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: ~ +- EID: 65982 + Name: Transition + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1920, y: 1080, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 120016136 + IsActive: true + UI Component: + Canvas ID: 450 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.SceneFadeInOut + Enabled: true + alphaValue: 1 + fadeInTime: 0.300000012 + fadeOutTime: 0.300000012 \ No newline at end of file diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index 89ca90ff..2ed42280 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -3530,8 +3530,8 @@ NumberOfChildren: 5 Components: Transform Component: - Translate: {x: 2.35245037, y: 0.38365531, z: 7.10571432} - Rotate: {x: 0, y: 0, z: 0} + Translate: {x: 2.35245037, y: 0.0613552481, z: 7.10571432} + Rotate: {x: -0, y: 3.14159274, z: -0} Scale: {x: 0.999999881, y: 1, z: 0.999999881} IsActive: true Renderable Component: @@ -3611,7 +3611,7 @@ Components: Transform Component: Translate: {x: 0, y: -5.96046448e-08, z: 0} - Rotate: {x: 0, y: 6.28318548, z: 2.23517329e-08} + Rotate: {x: 0, y: 3.14159274, z: 2.23517329e-08} Scale: {x: 1, y: 1, z: 1} IsActive: true Camera Component: @@ -14569,4 +14569,40 @@ stayDuration: 1 rotationAmt: 1800 scaleAmtX: 538 - scaleAmtY: 377 \ No newline at end of file + scaleAmtY: 377 +- EID: 548 + Name: TransitionCanvas + IsActive: true + NumberOfChildren: 1 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: ~ +- EID: 549 + Name: Transition + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1920, y: 1080, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 120016136 + IsActive: true + UI Component: + Canvas ID: 548 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.SceneFadeInOut + Enabled: true + alphaValue: 1 + fadeInTime: 0.5 + fadeOutTime: 0.5 \ 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 e27e6b5e..9781f466 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -344,6 +344,7 @@ public class PlayerController : Script private void Rotation() { + tranform.LocalEulerAngles = new Vector3(0.0f, tranform.LocalEulerAngles.y, 0.0f); if (isMoveKeyPress && tranform && !isAiming) { Quaternion currentRotation = tranform.LocalRotation; @@ -356,6 +357,7 @@ public class PlayerController : Script Quaternion targetRotation = Quaternion.Euler(0.0f, SHADE.Math.DegreesToRadians(camArm.Yaw + 180.0f), 0.0f); tranform.LocalRotation = Quaternion.Slerp(currentRotation, targetRotation, rotationFactorPerFrame * (float)Time.FixedDeltaTime); } + } private void Gravity() diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index 2aa6271b..78773ed3 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -72,6 +72,11 @@ public class GameManager : Script goingToWin = false; goingToLose = false; + + if (scoreText) + scoreText.GetComponent().Text = $"Score: {Score}"; + if (timeText) + timeText.GetComponent().Text = $"Time Left: {timer.ToString("0")}"; } protected override void start() @@ -91,7 +96,7 @@ public class GameManager : Script protected override void update() { - if (GamePause) + if (GamePause || stealFoodPopUp) { return; } @@ -102,7 +107,7 @@ public class GameManager : Script if(scoreText) scoreText.GetComponent().Text = $"Score: {Score}"; if(timeText) - timeText.GetComponent().Text = $"Time Left: {timer.ToString("0.00")}"; + timeText.GetComponent().Text = $"Time Left: {timer.ToString("0")}"; if (itemScored) { diff --git a/Assets/Scripts/Gameplay/SC_PreviewLevel.cs.shmeta b/Assets/Scripts/Gameplay/SC_PreviewLevel.cs.shmeta new file mode 100644 index 00000000..6eb37f9a --- /dev/null +++ b/Assets/Scripts/Gameplay/SC_PreviewLevel.cs.shmeta @@ -0,0 +1,3 @@ +Name: SC_PreviewLevel +ID: 155897609 +Type: 9 diff --git a/Assets/Scripts/UI/SC_StealFoodPopUp.cs b/Assets/Scripts/UI/SC_StealFoodPopUp.cs index 60bec589..f7f8b75a 100644 --- a/Assets/Scripts/UI/SC_StealFoodPopUp.cs +++ b/Assets/Scripts/UI/SC_StealFoodPopUp.cs @@ -51,6 +51,13 @@ namespace SHADE_Scripting.UI //538x377 protected override void update() { + if (!SceneFadeInOut.Instance.FadeOutFinished()) + { + rot.Reset(); + scaleX.Reset(); + scaleY.Reset(); + return; + } if (!popInDone) { @@ -84,7 +91,6 @@ namespace SHADE_Scripting.UI } } - } } From e2ef32f130ba2788db492c213c31230b40b81a49 Mon Sep 17 00:00:00 2001 From: Brandon Mak Date: Thu, 2 Mar 2023 15:29:24 +0800 Subject: [PATCH 05/11] Fixed Trajectory Rendering --- Assets/Shaders/Trajectory_VS.glsl | 2 +- Assets/Shaders/Trajectory_VS.shshaderb | Bin 1973 -> 1957 bytes SHADE_Engine/src/Common/SHAllComponents.h | 3 +- .../Inspector/SHEditorComponentView.hpp | 93 ++++++++++++++++++ .../MiddleEnd/Interface/SHGraphicsConstants.h | 3 +- .../MiddleEnd/Interface/SHGraphicsSystem.cpp | 6 +- .../SHTrajectoryRenderingSubSystem.cpp | 24 +++-- .../src/Serialization/SHSerialization.cpp | 3 + .../src/Serialization/SHYAMLConverters.h | 15 +++ 9 files changed, 136 insertions(+), 13 deletions(-) diff --git a/Assets/Shaders/Trajectory_VS.glsl b/Assets/Shaders/Trajectory_VS.glsl index 86be6b7e..1b4de7f7 100644 --- a/Assets/Shaders/Trajectory_VS.glsl +++ b/Assets/Shaders/Trajectory_VS.glsl @@ -32,5 +32,5 @@ void main() Out.uv = aUV; Out.color = aColor; - gl_Position = cameraData.projMat * aTransform * vec4(aPos, 1.0f); + gl_Position = cameraData.vpMat * aTransform * vec4(aPos, 1.0f); } \ No newline at end of file diff --git a/Assets/Shaders/Trajectory_VS.shshaderb b/Assets/Shaders/Trajectory_VS.shshaderb index 6f509f5c39101e9c796f0e8d0de035a74a9217ec..b7a0f9fb7b1ae8a837c85483252ddfbcd76e3637 100644 GIT binary patch delta 456 zcmX|-&q@MO6voe;85IH%7wOIh?2ndX+8+s`qE*|3pp6?hL4t+j0~quK*4Awg5Ycn^ z5I#rI@4HMo{5a=)=ey?~?|12=RB?-f`Ck~+$((Ii(R%aBeXfC=e5Nb6scd+c4xgqE z&*|7KXOSgequ|w*)v7@VH(ve?mu?o5ZX*Q{dm`H-x~x8@uUf~YRjCh%dC(}GZxPj# zF2Cwztwr8@NNx6V)ng~!75UoU2l>fN_wPU*if}HlR6Zb(L>GJ6Q zHt6m?9_`r4G{RczW}0@!_vnpBnW*J%t-xn?3>u&V>g!L;8LZw3XaRYy(W=B#&>L^T OCC{T;z8{|F4E_KYIU&UW delta 456 zcmX|-&q@MO6voe;@ehO{F4A2MSXr8*R#s37t=c9Ct=$9)6-*Cc;S-q8(5_8{&(TBl z9EHDcxHiL&bIy0Zd(XZ1y|^rv-ACTiFAS<=&Ngh*&gbR3>>+aenf$mdWusv-dVIcr zN*>Izma+J263kplt!)V5CYArfZ#Qj_7Lay*E27>b4}7G4d!1_DK2$;H=;4WoHITlp>*SjI#=Rn91LTn|kLI;N zvj%uHr{gukzjo|3oe|$SHJ*4;7r(VUzu75h11(Trhn};sdR@=~;M1& diff --git a/SHADE_Engine/src/Common/SHAllComponents.h b/SHADE_Engine/src/Common/SHAllComponents.h index 36b74853..ee900736 100644 --- a/SHADE_Engine/src/Common/SHAllComponents.h +++ b/SHADE_Engine/src/Common/SHAllComponents.h @@ -13,4 +13,5 @@ #include "Graphics/MiddleEnd/Interface/SHRenderable.h" #include "Physics/Interface/SHColliderComponent.h" #include "Graphics/MiddleEnd/TextRendering/SHTextRenderableComponent.h" -#include "AudioSystem/SHAudioListenerComponent.h" \ No newline at end of file +#include "AudioSystem/SHAudioListenerComponent.h" +#include "Graphics/MiddleEnd/TrajectoryRendering/SHTrajectoryRenderableComponent.h" diff --git a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp index af03ffa6..17b9a229 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp +++ b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp @@ -27,6 +27,8 @@ #include "Physics/Collision/Shapes/SHSphere.h" #include "../SHEditorWindowManager.h" #include "../AssetBrowser/SHAssetBrowser.h" +#include "Graphics/MiddleEnd/TrajectoryRendering/SHTrajectoryRenderableComponent.h" + namespace SHADE { template @@ -679,4 +681,95 @@ namespace SHADE ImGui::PopID(); } + template<> + static void DrawComponent(SHTrajectoryRenderableComponent* component) + { + if (!component) + return; + + ImGui::PushID(SHFamilyID::GetID()); + + const auto componentType = rttr::type::get(*component); + + SHEditorWidgets::CheckBox("##IsActive", [component]() {return component->isActive; }, [component](bool const& active) {component->isActive = active; }, "Is Component Active"); + + ImGui::SameLine(); + if (ImGui::CollapsingHeader(componentType.get_name().data(), ImGuiTreeNodeFlags_DefaultOpen)) + { + DrawContextMenu(component); + Handle const& mesh = component->GetMesh(); + const auto MESH_NAME = SHResourceManager::GetAssetName(mesh).value_or(""); + SHEditorWidgets::DragDropReadOnlyField("Mesh", MESH_NAME, [component]() + { + Handle const& mesh = component->GetMesh(); + return SHResourceManager::GetAssetID(mesh).value_or(0); + }, + [component](AssetID const& id) + { + if (SHAssetManager::GetType(id) != AssetType::MESH) + { + SHLOG_WARNING("Attempted to assign non mesh asset to Renderable Mesh property!") + return; + } + component->SetMesh(SHResourceManager::LoadOrGet(id)); + SHResourceManager::FinaliseChanges(); + }, SHDragDrop::DRAG_RESOURCE); + + if (ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) + { + if (Handle const& mesh = component->GetMesh()) + { + AssetID assetID = SHResourceManager::GetAssetID(mesh).value_or(0); + SHEditorWindowManager::GetEditorWindow()->SetScrollTo(assetID); + } + } + + SHEditorWidgets::ColorPicker("Start Color", + [comp = component]() + { + SHVec4 newColor(comp->GetStartColor()); + newColor.w = comp->GetStartAlpha(); + return newColor; + }, + [comp = component](SHVec4 vec) + { + SHVec3 temp{vec.x, vec.y, vec.z}; + float a = vec.w; + comp->SetStartColor(temp); + comp->SetStartAlpha(a); + }); + + SHEditorWidgets::ColorPicker("End Color", + [comp = component]() + { + SHVec4 newColor(comp->GetEndColor()); + newColor.w = comp->GetEndAlpha(); + return newColor; + }, + [comp = component](SHVec4 vec) + { + SHVec3 temp{ vec.x, vec.y, vec.z }; + float a = vec.w; + comp->SetEndColor(temp); + comp->SetEndAlpha(a); + }); + + SHEditorWidgets::DragFloat("Color Evolve Rate", + [comp = component]() + { + return comp->GetColorEvolveRate(); + }, + [comp = component](float rate) + { + return comp->SetColorEvolveRate(rate); + }); + + } + else + { + DrawContextMenu(component); + } + ImGui::PopID(); + } + } diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsConstants.h b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsConstants.h index 468cc0c7..d2fcb77e 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsConstants.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsConstants.h @@ -130,7 +130,7 @@ namespace SHADE static constexpr std::string_view GBUFFER_WRITE_VFX_SUBPASS = "G-Buffer Write With VFX"; static constexpr std::string_view UI_SUBPASS = "UI"; static constexpr std::string_view UI_TRANSLUCENT_SUBPASS = "UI Translucent"; - static constexpr std::string_view VFX_SUBPASS = "VFX"; + static constexpr std::string_view VFX_SUBPASS = "VFX Subpass"; static constexpr std::string_view OBJ_VFX_SUBPASS = "Object VFX Subpass No Depth"; static constexpr std::array USABLE_SUBPASSES = @@ -362,6 +362,7 @@ namespace SHADE */ /***************************************************************************/ static constexpr uint32_t TRAJECTORY_COLOR = 2; + static constexpr uint32_t TRAJECTORY_TRANSFORM = 3; static constexpr uint32_t CALCULATED_GLYPH_POSITION = 0; static constexpr uint32_t GLYPH_INDEX = 1; diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp index 4681c4ae..e7f1ae68 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp @@ -337,7 +337,7 @@ namespace SHADE /* VFX PASS */ /*-----------------------------------------------------------------------*/ auto vfxPass = renderGraph->AddNode(SHGraphicsConstants::RenderGraphEntityNames::VFX_PASS.data(), { "Scene", "Depth Buffer" }, { SHGraphicsConstants::RenderGraphEntityNames::GBUFFER_PASS.data(), SHGraphicsConstants::RenderGraphEntityNames::DEFERRED_COMPOSITE_PASS.data() }); - auto vfxSubpass = vfxPass->AddSubpass("Vfx Subpass", worldViewport, worldRenderer); + auto vfxSubpass = vfxPass->AddSubpass(SHGraphicsConstants::RenderGraphEntityNames::VFX_SUBPASS.data(), worldViewport, worldRenderer); vfxSubpass->AddColorOutput("Scene"); vfxSubpass->AddDepthOutput("Depth Buffer"); vfxSubpass->AddExteriorDrawCalls([=](Handle cmdBuffer, Handle renderer, uint32_t frameIndex) @@ -485,8 +485,8 @@ namespace SHADE trajectoryRenderingSubSystem = resourceManager.Create(); - auto vfxNode = renderGraph->GetNode(SHGraphicsConstants::RenderGraphEntityNames::SCREEN_SPACE_PASS.data()); - trajectoryRenderingSubSystem->Init(device, vfxNode->GetRenderpass(), vfxNode->GetSubpass(SHGraphicsConstants::RenderGraphEntityNames::UI_SUBPASS), trajectoryVS, trajectoryFS); + auto vfxNode = renderGraph->GetNode(SHGraphicsConstants::RenderGraphEntityNames::VFX_PASS.data()); + trajectoryRenderingSubSystem->Init(device, vfxNode->GetRenderpass(), vfxNode->GetSubpass(SHGraphicsConstants::RenderGraphEntityNames::VFX_SUBPASS), trajectoryVS, trajectoryFS); SHGlobalDescriptorSets::SetLightingSubSystem(lightingSubSystem); diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/TrajectoryRendering/SHTrajectoryRenderingSubSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/TrajectoryRendering/SHTrajectoryRenderingSubSystem.cpp index 61631925..cbf593d4 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/TrajectoryRendering/SHTrajectoryRenderingSubSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/TrajectoryRendering/SHTrajectoryRenderingSubSystem.cpp @@ -68,6 +68,8 @@ namespace SHADE } pipeline->GetPipelineState().SetColorBlenState(colorBlendState); + + pipeline->ConstructPipeline(); } void SHTrajectoryRenderingSubSystem::Run(uint32_t frameIndex) noexcept @@ -75,12 +77,16 @@ namespace SHADE auto& comps = SHComponentManager::GetDense(); for (auto& comp : comps) { - comp.SetPositions(std::vector - { - SHVec3 {}, - SHVec3 {} - }); + //std::vector test{}; + //test.resize(10); + //float x = 0.0f; + //for (auto& vec : test) + //{ + // vec = SHVec3(x, 5.0f, 0.0f); + // x += 0.5f; + //} + //comp.SetPositions (test); // If has positions, feed data to buffer. if (comp.HasPositions()) { @@ -122,12 +128,13 @@ namespace SHADE transformData.push_back(trs); colorData.push_back(currentColor); + // evolve lerp value and clamp to 1 + lerpValue = std::min (1.0f, lerpValue + colorEvolveRate); + // evolve color currentColor = SHVec3::Lerp(startColor, endColor, lerpValue); currentColor.w = SHMath::Lerp (comp.GetStartAlpha(), comp.GetEndAlpha(), lerpValue); - // evolve lerp value and clamp to 1 - lerpValue = std::max (1.0f, lerpValue + colorEvolveRate); } // add draw data for this trajectory @@ -178,6 +185,9 @@ namespace SHADE // Bind color vertex buffer cmdBuffer->BindVertexBuffer(SHGraphicsConstants::VertexBufferBindings::TRAJECTORY_COLOR, colorBuffer, 0); + // Bind transform data + cmdBuffer->BindVertexBuffer(SHGraphicsConstants::VertexBufferBindings::TRAJECTORY_TRANSFORM, transformBuffer, 0); + // call draw call cmdBuffer->DrawMultiIndirect(drawDataBuffer, drawData.size()); diff --git a/SHADE_Engine/src/Serialization/SHSerialization.cpp b/SHADE_Engine/src/Serialization/SHSerialization.cpp index 13f5e36e..b6455935 100644 --- a/SHADE_Engine/src/Serialization/SHSerialization.cpp +++ b/SHADE_Engine/src/Serialization/SHSerialization.cpp @@ -247,6 +247,7 @@ namespace SHADE AddComponentToComponentNode(components, eid); AddComponentToComponentNode(components, eid); AddComponentToComponentNode(components, eid); + AddComponentToComponentNode(components, eid); node[ComponentsNode] = components; @@ -308,6 +309,7 @@ namespace SHADE AddComponentID(componentIDList, componentsNode); AddComponentID(componentIDList, componentsNode); AddComponentID(componentIDList, componentsNode); + AddComponentID(componentIDList, componentsNode); return componentIDList; } @@ -395,5 +397,6 @@ namespace SHADE SHSerializationHelper::InitializeComponentFromNode(componentsNode, eid); SHSerializationHelper::InitializeComponentFromNode(componentsNode, eid); SHSerializationHelper::InitializeComponentFromNode(componentsNode, eid); + SHSerializationHelper::InitializeComponentFromNode(componentsNode, eid); } } diff --git a/SHADE_Engine/src/Serialization/SHYAMLConverters.h b/SHADE_Engine/src/Serialization/SHYAMLConverters.h index 2c212e5f..ca0c0185 100644 --- a/SHADE_Engine/src/Serialization/SHYAMLConverters.h +++ b/SHADE_Engine/src/Serialization/SHYAMLConverters.h @@ -32,6 +32,8 @@ namespace YAML struct HasYAMLConv : std::true_type {}; template<> struct HasYAMLConv : std::true_type {}; + template<> + struct HasYAMLConv : std::true_type {}; template<> struct convert @@ -431,6 +433,8 @@ namespace YAML static constexpr std::string_view MESH_YAML_TAG = "Mesh"; static constexpr std::string_view START_COLOR_YAML_TAG = "Start Color"; static constexpr std::string_view END_COLOR_YAML_TAG = "End Color"; + static constexpr std::string_view START_ALPHA_YAML_TAG = "Start Alpha"; + static constexpr std::string_view END_ALPHA_YAML_TAG = "End Alpha"; static constexpr std::string_view COLOR_EVAL_RATE_YAML_TAG = "Color Eval Rate "; static YAML::Node encode(SHTrajectoryRenderableComponent const& rhs) @@ -438,7 +442,9 @@ namespace YAML YAML::Node node; node[MESH_YAML_TAG.data()] = SHResourceManager::GetAssetID(rhs.GetMesh()).value_or(0); node[START_COLOR_YAML_TAG.data()] = SHVec3(rhs.GetStartColor()); + node[START_ALPHA_YAML_TAG.data()] = rhs.GetStartAlpha(); node[END_COLOR_YAML_TAG.data()] = SHVec3(rhs.GetEndColor()); + node[END_ALPHA_YAML_TAG.data()] = rhs.GetEndAlpha(); node[COLOR_EVAL_RATE_YAML_TAG.data()] = rhs.GetColorEvolveRate(); return node; @@ -447,10 +453,19 @@ namespace YAML { if (node[MESH_YAML_TAG.data()].IsDefined()) rhs.SetMesh(SHResourceManager::LoadOrGet(node[MESH_YAML_TAG.data()].as())); + if (node[START_COLOR_YAML_TAG.data()].IsDefined()) rhs.SetStartColor(node[START_COLOR_YAML_TAG.data()].as()); + + if (node[START_ALPHA_YAML_TAG.data()].IsDefined()) + rhs.SetStartAlpha(node[START_ALPHA_YAML_TAG.data()].as()); + if (node[END_COLOR_YAML_TAG.data()].IsDefined()) rhs.SetEndColor(node[END_COLOR_YAML_TAG.data()].as()); + + if (node[END_ALPHA_YAML_TAG.data()].IsDefined()) + rhs.SetEndAlpha(node[END_ALPHA_YAML_TAG.data()].as()); + if (node[COLOR_EVAL_RATE_YAML_TAG.data()].IsDefined()) rhs.SetColorEvolveRate(node[COLOR_EVAL_RATE_YAML_TAG.data()].as()); From e05e21ec5a3ef3a17caafde76ae306dcf5c3cebd Mon Sep 17 00:00:00 2001 From: Brandon Mak Date: Thu, 2 Mar 2023 15:49:28 +0800 Subject: [PATCH 06/11] Added text size for text renderable component --- .../EditorWindow/Inspector/SHEditorComponentView.hpp | 2 +- .../TextRendering/SHTextRenderableComponent.cpp | 12 ++++++++++++ .../TextRendering/SHTextRenderableComponent.h | 5 +++++ .../TextRendering/SHTextRenderingSubSystem.cpp | 7 +++++-- SHADE_Engine/src/Serialization/SHYAMLConverters.h | 8 +++++++- 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp index 17b9a229..8adb45b5 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp +++ b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp @@ -601,7 +601,7 @@ namespace SHADE component->SetText(val); } ); - + SHEditorWidgets::DragVec3("Text Size", { "X", "Y", "Z" }, [&textComp = component]() {return textComp->GetTextSize();}, [&textComp = component](SHVec3 const& size) {textComp->SetTextSize(size); }); SHEditorWidgets::ColorPicker("Color", [&textComp = component]() {return textComp->GetColor(); }, [&textComp = component](SHVec4 const& newColor) {textComp->SetColor(newColor); }); } else diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderableComponent.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderableComponent.cpp index 3edf0983..5703a9c1 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderableComponent.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderableComponent.cpp @@ -29,6 +29,8 @@ namespace SHADE // Default white color. color = SHColour::WHITE; + + textSize = SHVec3::One; } void SHTextRenderableComponent::OnDestroy(void) @@ -66,6 +68,11 @@ namespace SHADE color = newColor; } + void SHTextRenderableComponent::SetTextSize(SHVec3 const& size) noexcept + { + textSize = size; + } + /***************************************************************************/ /*! @@ -92,6 +99,11 @@ namespace SHADE return color; } + SHVec3 const& SHTextRenderableComponent::GetTextSize(void) const noexcept + { + return textSize; + } + } namespace rttr diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderableComponent.h b/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderableComponent.h index 9d31cdd8..81d3a85f 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderableComponent.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderableComponent.h @@ -40,6 +40,9 @@ namespace SHADE //! character position data for each letter in the text Handle charPositionDataBuffer; + //! Text size. Multiplied to TRS. + SHVec3 textSize; + void MakeDirty (void) noexcept; void Clean (void) noexcept; @@ -53,10 +56,12 @@ namespace SHADE void SetText (std::string_view newText) noexcept; void SetFont(Handle font) noexcept; void SetColor(SHColour const& newColor) noexcept; + void SetTextSize (SHVec3 const& size) noexcept; std::string const& GetText (void) const noexcept; Handle GetFont (void) const noexcept; SHColour const& GetColor (void) const noexcept; + SHVec3 const& GetTextSize (void) const noexcept; friend class SHTextRenderingSubSystem; diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderingSubSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderingSubSystem.cpp index 9ab6106d..ff9168c9 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderingSubSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/TextRendering/SHTextRenderingSubSystem.cpp @@ -210,10 +210,13 @@ namespace SHADE cmdBuffer->BindVertexBuffer(SHGraphicsConstants::VertexBufferBindings::CALCULATED_GLYPH_POSITION, comp.charPositionDataBuffer, 0); cmdBuffer->BindVertexBuffer(SHGraphicsConstants::VertexBufferBindings::GLYPH_INDEX, comp.indexingDataBuffer, 0); + auto const& textSize = comp.textSize; + SHMatrix textSizeScale{textSize.x, 0.0f, 0.0f, 0.0f, 0.0f, textSize.y, 0.0f, 0.0f, 0.0f, 0.0f, textSize.z, 0.0f}; + if (auto* uiComp = SHComponentManager::GetComponent_s(comp.GetEID())) - cmdBuffer->SetPushConstantVariable("TestPushConstant.worldTransform", uiComp->GetMatrix(), SH_PIPELINE_TYPE::GRAPHICS); + cmdBuffer->SetPushConstantVariable("TestPushConstant.worldTransform", textSizeScale * uiComp->GetMatrix(), SH_PIPELINE_TYPE::GRAPHICS); else - cmdBuffer->SetPushConstantVariable("TestPushConstant.worldTransform", transform->GetTRS(), SH_PIPELINE_TYPE::GRAPHICS); + cmdBuffer->SetPushConstantVariable("TestPushConstant.worldTransform", textSizeScale * transform->GetTRS(), SH_PIPELINE_TYPE::GRAPHICS); cmdBuffer->SetPushConstantVariable("TestPushConstant.eid", comp.GetEID(), SH_PIPELINE_TYPE::GRAPHICS); diff --git a/SHADE_Engine/src/Serialization/SHYAMLConverters.h b/SHADE_Engine/src/Serialization/SHYAMLConverters.h index ca0c0185..bd714fd3 100644 --- a/SHADE_Engine/src/Serialization/SHYAMLConverters.h +++ b/SHADE_Engine/src/Serialization/SHYAMLConverters.h @@ -357,6 +357,7 @@ namespace YAML static constexpr std::string_view TEXT_YAML_TAG = "Text"; static constexpr std::string_view FONT_YAML_TAG = "Font"; static constexpr std::string_view COLOR_YAML_TAG = "Color"; + static constexpr std::string_view TEXT_SIZE_YAML_TAG = "Text Size"; static YAML::Node encode(SHTextRenderableComponent const& rhs) { @@ -372,7 +373,8 @@ namespace YAML { node[FONT_YAML_TAG.data()] = 0; } - node[COLOR_YAML_TAG.data()] = SHVec4 (textColor); + node[COLOR_YAML_TAG.data()] = SHVec4(textColor); + node[TEXT_SIZE_YAML_TAG.data()] = rhs.GetTextSize(); return node; } static bool decode(YAML::Node const& node, SHTextRenderableComponent& rhs) @@ -395,6 +397,10 @@ namespace YAML { rhs.SetColor(node[COLOR_YAML_TAG.data()].as()); } + if (node[TEXT_SIZE_YAML_TAG.data()].IsDefined()) + { + rhs.SetTextSize(node[TEXT_SIZE_YAML_TAG.data()].as()); + } return true; } }; From 61a877cee14ebb55ae8f4b26cc762e3e46461f47 Mon Sep 17 00:00:00 2001 From: Brandon Mak Date: Thu, 2 Mar 2023 16:04:22 +0800 Subject: [PATCH 07/11] Fixed bug texture loading - During mipmap transfer to GPU, height would sometimes be 0. Fixed it using std::max --- Assets/Shaders/UI_FS.glsl | 2 +- Assets/Shaders/UI_FS.shshaderb | Bin 2125 -> 2125 bytes .../src/Graphics/Images/SHVkImage.cpp | 2 +- .../MiddleEnd/Textures/SHTextureLibrary.h | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Shaders/UI_FS.glsl b/Assets/Shaders/UI_FS.glsl index 30b59e48..3c66891b 100644 --- a/Assets/Shaders/UI_FS.glsl +++ b/Assets/Shaders/UI_FS.glsl @@ -37,7 +37,7 @@ layout(location = 1) out uint outEntityID; void main() { fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv); - if (fragColor.a < 0.01f) + if (fragColor.a < 0.1f) { discard; } diff --git a/Assets/Shaders/UI_FS.shshaderb b/Assets/Shaders/UI_FS.shshaderb index 92f4ed4ece0ecf30a998c0cac1a7117aa46cd281..d734949d4a6a368e405562b731d7f6de5c8bffab 100644 GIT binary patch delta 17 YcmX>ra8_UgFB{9*Gd{MP1=(zv06OgjtN;K2 delta 17 YcmX>ra8_UgFB=Qjb!D5)f^0TS05e4d$^ZZW diff --git a/SHADE_Engine/src/Graphics/Images/SHVkImage.cpp b/SHADE_Engine/src/Graphics/Images/SHVkImage.cpp index 53703924..28870797 100644 --- a/SHADE_Engine/src/Graphics/Images/SHVkImage.cpp +++ b/SHADE_Engine/src/Graphics/Images/SHVkImage.cpp @@ -262,7 +262,7 @@ namespace SHADE copyRegions[i].imageSubresource.baseArrayLayer = 0; // TODO: Array textures not supported yet copyRegions[i].imageSubresource.layerCount = layerCount; copyRegions[i].imageOffset = vk::Offset3D{ 0,0,0 }; - copyRegions[i].imageExtent = vk::Extent3D{ width >> i, height >> i, 1 }; + copyRegions[i].imageExtent = vk::Extent3D{ std::max (1u, width >> i), std::max (1u, height >> i), 1 }; } cmdBufferHdl->CopyBufferToImage(stagingBuffer, vkImage, copyRegions); diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h b/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h index bbc72a1a..e1c93349 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h @@ -71,7 +71,7 @@ namespace SHADE //! of the texture library would mean the recreation of the desc set that also //! involves the generic data, which is bad bad bad. Solution is to separate the //! 2 desc sets. - static constexpr uint32_t DEFAULT_MAX_TEXTURES = 2000; + static constexpr uint32_t DEFAULT_MAX_TEXTURES = 1000; /*-----------------------------------------------------------------------------*/ /* Usage Functions */ From 3a14f0a887141bb71b436e9f3e366cddead13ab5 Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Thu, 2 Mar 2023 16:54:34 +0800 Subject: [PATCH 08/11] Added SHRawAnimInspector --- SHADE_Engine/src/Animation/SHRawAnimation.cpp | 1 + SHADE_Engine/src/Animation/SHRawAnimation.h | 2 + .../Animation/SHAnimationControllerEditor.cpp | 2 +- .../Animation/SHAnimationControllerEditor.h | 29 +++ .../AssetBrowser/SHAssetBrowser.cpp | 19 +- .../SHRawAnimInspector.cpp | 170 ++++++++++++++++++ .../SHRawAnimInspector.h | 86 +++++++++ .../EditorWindow/SHEditorWindowIncludes.h | 21 +-- SHADE_Engine/src/Editor/SHEditor.cpp | 1 + 9 files changed, 313 insertions(+), 18 deletions(-) create mode 100644 SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp create mode 100644 SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.h diff --git a/SHADE_Engine/src/Animation/SHRawAnimation.cpp b/SHADE_Engine/src/Animation/SHRawAnimation.cpp index 86d0af18..712611d4 100644 --- a/SHADE_Engine/src/Animation/SHRawAnimation.cpp +++ b/SHADE_Engine/src/Animation/SHRawAnimation.cpp @@ -22,6 +22,7 @@ namespace SHADE SHRawAnimation::SHRawAnimation(const SHAnimAsset& asset) : ticksPerSecond { static_cast(asset.ticksPerSecond) } , totalTime { static_cast(asset.duration) / static_cast(asset.ticksPerSecond) } + , totalFrames { static_cast(asset.duration) } { // Populate keyframes for (const auto& channel : asset.nodeChannels) diff --git a/SHADE_Engine/src/Animation/SHRawAnimation.h b/SHADE_Engine/src/Animation/SHRawAnimation.h index ee5d3769..e05e1a74 100644 --- a/SHADE_Engine/src/Animation/SHRawAnimation.h +++ b/SHADE_Engine/src/Animation/SHRawAnimation.h @@ -67,6 +67,7 @@ namespace SHADE const std::vector& GetChannels() const noexcept { return channels; } int GetTicksPerSecond() const noexcept { return ticksPerSecond; } float GetTotalTime() const noexcept { return totalTime; } + int GetTotalFrames() const noexcept { return totalFrames; } private: /*---------------------------------------------------------------------------------*/ @@ -75,6 +76,7 @@ namespace SHADE std::vector channels; int ticksPerSecond; float totalTime; + int totalFrames; /*---------------------------------------------------------------------------------*/ /* Helper Functions */ diff --git a/SHADE_Engine/src/Editor/EditorWindow/Animation/SHAnimationControllerEditor.cpp b/SHADE_Engine/src/Editor/EditorWindow/Animation/SHAnimationControllerEditor.cpp index c829c985..65c4d010 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Animation/SHAnimationControllerEditor.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/Animation/SHAnimationControllerEditor.cpp @@ -3,7 +3,7 @@ \author Tng Kah Wei, kahwei.tng, 390009620 \par email: kahwei.tng\@digipen.edu \date Mar 1, 2023 -\brief Contains the definition of SHAnimationControllerEditor's functions. +\brief Contains the definition of SHAnimationControllerEditor's functions. Copyright (C) 2023 DigiPen Institute of Technology. diff --git a/SHADE_Engine/src/Editor/EditorWindow/Animation/SHAnimationControllerEditor.h b/SHADE_Engine/src/Editor/EditorWindow/Animation/SHAnimationControllerEditor.h index 7ac7432e..03da7771 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Animation/SHAnimationControllerEditor.h +++ b/SHADE_Engine/src/Editor/EditorWindow/Animation/SHAnimationControllerEditor.h @@ -12,6 +12,7 @@ of DigiPen Institute of Technology is prohibited. #pragma once // STL Includes +#include // Project Includes #include "Resource/SHHandle.h" #include "Editor/EditorWindow/SHEditorWindow.h" @@ -19,6 +20,9 @@ of DigiPen Institute of Technology is prohibited. namespace SHADE { + /// + /// Editor for modifying the Animation Controller state machine. + /// class SHAnimationControllerEditor final : public SHEditorWindow { public: @@ -36,10 +40,35 @@ namespace SHADE void Exit() override; private: + /*---------------------------------------------------------------------------------*/ + /* Type Definitions */ + /*---------------------------------------------------------------------------------*/ + union NodeAttributeIndex + { + int16_t Raw; + struct + { + uint8_t OwnerNodeIndex; + uint8_t AttributeIndex; + }; + }; + union NodeLinkIndex + { + int32_t Raw; + struct + { + NodeAttributeIndex SourceAttribute; + NodeAttributeIndex DestinationAttribute; + }; + }; // What about same source and destination but different link? + /*---------------------------------------------------------------------------------*/ /* Data Members */ /*---------------------------------------------------------------------------------*/ SHAnimationController controller; + std::vector> inputNodesMap; + std::vector> outputNodesMap; + std::vector linkIndices; // Encodes details of the link in the node index /*---------------------------------------------------------------------------------*/ /* Helper Functions */ diff --git a/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp b/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp index a0aaf0fa..c1796501 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp @@ -23,6 +23,7 @@ #include "Serialization/SHSerialization.h" #include #include "Serialization/Prefab/SHPrefabManager.h" +#include "Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.h" namespace SHADE { @@ -371,14 +372,18 @@ namespace SHADE case AssetType::SHADER: break; case AssetType::SHADER_BUILT_IN: break; case AssetType::TEXTURE: break; - case AssetType::MESH: break; + case AssetType::MODEL: + if (auto animInspector = SHEditorWindowManager::GetEditorWindow()) + { + animInspector->Open(asset->id); + } + break; + case AssetType::MESH: break; case AssetType::SCENE: - { - if(editor->LoadScene(asset->id)) - { - editor->editorConfig->workingSceneID = asset->id; - } - } + if (editor->LoadScene(asset->id)) + { + editor->editorConfig->workingSceneID = asset->id; + } break; case AssetType::PREFAB: break; case AssetType::MATERIAL: diff --git a/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp b/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp new file mode 100644 index 00000000..c2ccdb86 --- /dev/null +++ b/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp @@ -0,0 +1,170 @@ +/************************************************************************************//*! +\file SHRawAnimInspector.cpp +\author Tng Kah Wei, kahwei.tng, 390009620 +\par email: kahwei.tng\@digipen.edu +\date Mar 1, 2023 +\brief Contains the definition of SHRawAnimInspector's functions. + + +Copyright (C) 2023 DigiPen Institute of Technology. +Reproduction or disclosure of this file or its contents without the prior written consent +of DigiPen Institute of Technology is prohibited. +*//*************************************************************************************/ +#include "SHpch.h" +#include "SHRawAnimInspector.h" + +// STL Includes +#include +// External Dependencies +#include +#include +// Project Includes +#include "Editor/IconsMaterialDesign.h" +#include "Animation/SHAnimationClip.h" +#include "Resource/SHResourceManager.h" +#include "Editor/EditorWindow/SHEditorWindowManager.h" +#include "Editor/SHEditorUI.h" + +namespace SHADE +{ + /*-----------------------------------------------------------------------------------*/ + /* SHAnimClipCreatePrompt - Cosntructors/Destructors */ + /*-----------------------------------------------------------------------------------*/ + SHAnimClipCreatePrompt::SHAnimClipCreatePrompt() + : SHPopUpWindow("Create Animation Clip", true, 0, 0) {} + + /*---------------------------------------------------------------------------------*/ + /* SHAnimClipCreatePrompt - Lifecycle Functions */ + /*---------------------------------------------------------------------------------*/ + void SHAnimClipCreatePrompt::Init(Handle rawAnim) + { + rawAnimation = rawAnim; + + // Set default parameters + if (rawAnimation) + { + newAssetName.clear(); + firstIndex = 0; + lastIndex = rawAnimation->GetTotalFrames(); + } + } + + void SHAnimClipCreatePrompt::Draw() + { + if (Begin()) + { + // Properties + SHEditorUI::InputTextField("Name", newAssetName); + SHEditorUI::PushID(0); + SHEditorUI::InputSlider("First Frame Index", 0, rawAnimation->GetTotalFrames(), firstIndex); + SHEditorUI::PopID(); + SHEditorUI::PushID(1); + SHEditorUI::InputSlider("Last Frame Index", 0, rawAnimation->GetTotalFrames(), lastIndex); + SHEditorUI::PopID(); + + // Invalid values + const bool INVALID_CONFIG = newAssetName.empty() || firstIndex > lastIndex || lastIndex < firstIndex; + + // Buttons + ImGui::BeginDisabled(INVALID_CONFIG); + { + if (ImGui::Button("Save")) + { + // Generate new asset + + + // Close + isOpen = false; + ImGui::CloseCurrentPopup(); + } + } + ImGui::EndDisabled(); + ImGui::SameLine(); + if (ImGui::Button("Cancel")) + { + // Close + isOpen = false; + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); + } + } + + /*-----------------------------------------------------------------------------------*/ + /* Cosntructors/Destructors */ + /*-----------------------------------------------------------------------------------*/ + SHRawAnimInspector::SHRawAnimInspector() + : SHEditorWindow("Animation Editor", ImGuiWindowFlags_MenuBar) + {} + + /*-----------------------------------------------------------------------------------*/ + /* Lifecycle Functions */ + /*-----------------------------------------------------------------------------------*/ + void SHRawAnimInspector::Init() + { + SHEditorWindow::Init(); + + SHEditorWindowManager::CreatePopupWindow(); + } + + void SHRawAnimInspector::Update() + { + SHEditorWindow::Update(); + + // Draw + if (Begin()) + { + + // Ignore if no asset + if (currRawAnim) + { + drawMenuBar(); + + + + // Button to add a new clip + if (ImGui::Button(std::format("{} Add", ICON_MD_ADD).data())) + { + auto prompt = SHEditorWindowManager::GetPopupWindow(); + prompt->Init(currRawAnim); + prompt->isOpen = true; + } + + // Render all clips + } + } + ImGui::End(); + } + + void SHRawAnimInspector::Exit() + { + SHEditorWindow::Exit(); + } + + /*-----------------------------------------------------------------------------------*/ + /* Usage Functions */ + /*-----------------------------------------------------------------------------------*/ + void SHRawAnimInspector::Open(AssetID assetId) + { + currRawAnim = SHResourceManager::LoadOrGet(assetId); + } + + /*-----------------------------------------------------------------------------------*/ + /* Helper Functions */ + /*-----------------------------------------------------------------------------------*/ + void SHRawAnimInspector::drawMenuBar() + { + if (ImGui::BeginMenuBar()) + { + if (ImGui::Button(std::format("{} Save", ICON_MD_SAVE).data())) + { + + } + + const std::string& ASSET_NAME = SHResourceManager::GetAssetName(currRawAnim).value_or("Unnamed Asset"); + ImGui::Text(ASSET_NAME.c_str()); + + ImGui::EndMenuBar(); + } + } +} \ No newline at end of file diff --git a/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.h b/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.h new file mode 100644 index 00000000..c2006d87 --- /dev/null +++ b/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.h @@ -0,0 +1,86 @@ +/************************************************************************************//*! +\file SHRawAnimInspector.h +\author Tng Kah Wei, kahwei.tng, 390009620 +\par email: kahwei.tng\@digipen.edu +\date Mar 2, 2023 +\brief Contains the definition of SHRawAnimInspector. + +Copyright (C) 2023 DigiPen Institute of Technology. +Reproduction or disclosure of this file or its contents without the prior written consent +of DigiPen Institute of Technology is prohibited. +*//*************************************************************************************/ +#pragma once + +// Project Includes +#include "Assets/SHAssetMacros.h" +#include "Editor/EditorWindow/SHEditorWindow.h" +#include "Resource/SHHandle.h" +#include "Animation/SHRawAnimation.h" +#include "Editor/EditorWindow/SHPopUpWindow.h" + +namespace SHADE +{ + /// + /// Prompt for creating an animation clip. Init() must be called to pass in the correct + /// SHRawAnimation that the created clip will use. + /// + class SHAnimClipCreatePrompt : public SHPopUpWindow + { + public: + /*---------------------------------------------------------------------------------*/ + /* Constructors/Destructors */ + /*---------------------------------------------------------------------------------*/ + SHAnimClipCreatePrompt(); + + /*---------------------------------------------------------------------------------*/ + /* Lifecycle Functions */ + /*---------------------------------------------------------------------------------*/ + void Init(Handle rawAnim); + void Draw() override; + + private: + /*---------------------------------------------------------------------------------*/ + /* Data Members */ + /*---------------------------------------------------------------------------------*/ + std::string newAssetName; + int firstIndex; + int lastIndex; + Handle rawAnimation; + }; + + /// + /// Editor for generating SHAnimationClips from a single SHRawAnimation object. + /// + class SHRawAnimInspector final : public SHEditorWindow + { + public: + /*---------------------------------------------------------------------------------*/ + /* Constructors/Destructors */ + /*---------------------------------------------------------------------------------*/ + SHRawAnimInspector(); + ~SHRawAnimInspector() = default; + + /*---------------------------------------------------------------------------------*/ + /* Lifecycle Functions */ + /*---------------------------------------------------------------------------------*/ + void Init() override; + void Update() override; + void Exit() override; + + /*---------------------------------------------------------------------------------*/ + /* Usage Functions */ + /*---------------------------------------------------------------------------------*/ + void Open(AssetID assetId); + + private: + /*---------------------------------------------------------------------------------*/ + /* Data Members */ + /*---------------------------------------------------------------------------------*/ + Handle currRawAnim; + + /*---------------------------------------------------------------------------------*/ + /* Helper Functions */ + /*---------------------------------------------------------------------------------*/ + void drawMenuBar(); + }; +} diff --git a/SHADE_Engine/src/Editor/EditorWindow/SHEditorWindowIncludes.h b/SHADE_Engine/src/Editor/EditorWindow/SHEditorWindowIncludes.h index 829a1871..e0247d69 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/SHEditorWindowIncludes.h +++ b/SHADE_Engine/src/Editor/EditorWindow/SHEditorWindowIncludes.h @@ -1,11 +1,12 @@ #pragma once -#include "MenuBar/SHEditorMenuBar.h" // Menu Bar -#include "HierarchyPanel/SHHierarchyPanel.h" // Hierarchy Panel -#include "Inspector/SHEditorInspector.h" // Inspector -#include "Profiling/SHEditorProfiler.h" // Profiler -#include "ViewportWindow/SHEditorViewport.h" // Editor Viewport -#include "AssetBrowser/SHAssetBrowser.h" // Asset Browser -#include "MaterialInspector/SHMaterialInspector.h" // Material Inspector -#include "ColliderTagPanel/SHColliderTagPanel.h" // Collider Tag Panel -#include "InputBindings/SHInputBindingsPanel.h" // Input Bindings -#include "EditorWindow/Animation/SHAnimationControllerEditor.h" // Animation Controller Editor \ No newline at end of file +#include "MenuBar/SHEditorMenuBar.h" // Menu Bar +#include "HierarchyPanel/SHHierarchyPanel.h" // Hierarchy Panel +#include "Inspector/SHEditorInspector.h" // Inspector +#include "Profiling/SHEditorProfiler.h" // Profiler +#include "ViewportWindow/SHEditorViewport.h" // Editor Viewport +#include "AssetBrowser/SHAssetBrowser.h" // Asset Browser +#include "MaterialInspector/SHMaterialInspector.h" // Material Inspector +#include "ColliderTagPanel/SHColliderTagPanel.h" // Collider Tag Panel +#include "InputBindings/SHInputBindingsPanel.h" // Input Bindings +#include "EditorWindow/Animation/SHAnimationControllerEditor.h" // Animation Controller Editor +#include "EditorWindow/RawAnimationInspector/SHRawAnimInspector.h" // Raw Animation Inspector diff --git a/SHADE_Engine/src/Editor/SHEditor.cpp b/SHADE_Engine/src/Editor/SHEditor.cpp index 904a239b..1b45073c 100644 --- a/SHADE_Engine/src/Editor/SHEditor.cpp +++ b/SHADE_Engine/src/Editor/SHEditor.cpp @@ -118,6 +118,7 @@ namespace SHADE SHEditorWindowManager::CreateEditorWindow(); SHEditorWindowManager::CreateEditorWindow(); + SHEditorWindowManager::CreateEditorWindow(); //Add popup windows SHEditorWindowManager::CreatePopupWindow(); From 8c74ec85d3955d16756c949ff5d391eff1c8c281 Mon Sep 17 00:00:00 2001 From: Glence Date: Thu, 2 Mar 2023 17:33:02 +0800 Subject: [PATCH 09/11] Done with level preview --- Assets/Scenes/Level1.shade | 184 +++++++------ Assets/Scenes/Level2.shade | 245 ++++++++++++------ .../Gameplay/Player/SC_PickAndThrow.cs | 4 +- .../Gameplay/Player/SC_PlayerController.cs | 4 +- .../Gameplay/Player/SC_ThirdPersonCamera.cs | 2 +- Assets/Scripts/Gameplay/SC_GameManager.cs | 8 +- Assets/Scripts/Gameplay/SC_PreviewLevel.cs | 177 ++++++++++--- Assets/Scripts/UI/EasingHelper.cs | 4 +- Assets/Scripts/UI/SC_PauseMenu.cs | 2 +- Assets/Scripts/UI/SC_SceneFadeInOut.cs | 1 - Assets/Scripts/UI/SC_StealFoodPopUp.cs | 4 +- .../Serialization/SHSerializationHelper.hpp | 6 +- 12 files changed, 431 insertions(+), 210 deletions(-) diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index 1dd30cd9..cd5ba82e 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -4118,8 +4118,9 @@ Scale: {x: 60, y: 60, z: 60} IsActive: true Text Renderer Component: - Text: My name is Brandon. + Text: "Score: 0" Font: 176667660 + Color: {x: 1, y: 1, z: 1, w: 1} IsActive: true Scripts: ~ - EID: 206 @@ -4133,8 +4134,9 @@ Scale: {x: 60, y: 60, z: 60} IsActive: true Text Renderer Component: - Text: My name is Brandon. + Text: "Time Left: 200" Font: 176667660 + Color: {x: 1, y: 1, z: 1, w: 1} IsActive: true Scripts: ~ - EID: 238 @@ -4150,6 +4152,7 @@ Text Renderer Component: Text: "" Font: 176667660 + Color: {x: 1, y: 1, z: 1, w: 1} IsActive: true Scripts: ~ - EID: 236 @@ -4163,7 +4166,7 @@ winScene: 86098106 loseScene: 91685359 currGameState: 0 - totalItemCount: 0 + totalItemCount: 4 Score: 0 timer: 200 scoreText: 237 @@ -4184,8 +4187,8 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0.406909943, y: 0.100000001, z: -2} - Rotate: {x: -0, y: 0, z: -0} + Translate: {x: 2.13981342, y: 0.0490087792, z: -1.96055627} + Rotate: {x: 0, y: -1.53675354, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: @@ -4292,8 +4295,8 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 3.71994686, y: 1.14058578, z: -9.35119247} - Rotate: {x: -0, y: 0, z: -0} + Translate: {x: 3.71994758, y: 1.0997268, z: -9.35119152} + Rotate: {x: 4.18975469e-06, y: -1.08915871e-11, z: -5.03928231e-06} Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: @@ -4335,7 +4338,7 @@ dontReturn: false soundDistance: 10 highlightSpeed: 200 - highlightThickness: 600 + highlightThickness: 120 highlightLowerClamp: 0.25 - EID: 227 Name: Mesh_Cheese @@ -4343,8 +4346,8 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 3.22328258, y: 1.08429813, z: -0.57395637} - Rotate: {x: -0, y: 0, z: -0} + Translate: {x: 3.22328258, y: 1.02709854, z: -0.57395637} + Rotate: {x: 5.62993963e-09, y: -7.03049191e-17, z: -1.92319405e-08} Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: @@ -4386,7 +4389,7 @@ dontReturn: false soundDistance: 10 highlightSpeed: 200 - highlightThickness: 600 + highlightThickness: 50 highlightLowerClamp: 0.25 - EID: 65778 Name: Mesh_Apple @@ -4394,8 +4397,8 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -2.5, y: 0.778462529, z: -5} - Rotate: {x: -0, y: 0, z: -0} + Translate: {x: -2.50000072, y: 0.799999774, z: -5.00000095} + Rotate: {x: -4.09249949e-08, y: 1.40052995e-13, z: 2.95086267e-08} Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: @@ -4437,7 +4440,7 @@ dontReturn: false soundDistance: 10 highlightSpeed: 200 - highlightThickness: 600 + highlightThickness: 60 highlightLowerClamp: 0.25 - EID: 216 Name: Mesh_Apple @@ -4445,8 +4448,8 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -2.5, y: 0.778462529, z: -4.28408813} - Rotate: {x: -0, y: 0, z: -0} + Translate: {x: -2.50000072, y: 0.799999893, z: -4.28408909} + Rotate: {x: -5.83341553e-08, y: 7.48974247e-14, z: 1.10461471e-08} Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: @@ -4488,7 +4491,7 @@ dontReturn: false soundDistance: 10 highlightSpeed: 200 - highlightThickness: 600 + highlightThickness: 60 highlightLowerClamp: 0.25 - EID: 229 Name: ====ScoreZonePool==== @@ -4503,7 +4506,7 @@ Components: Transform Component: Translate: {x: -7.47360849, y: 1.4327563, z: -2.44241929} - Rotate: {x: -0, y: 0, z: -0} + Rotate: {x: -0, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true RigidBody Component: @@ -4565,7 +4568,7 @@ Components: Transform Component: Translate: {x: 1.97487497, y: 1.3500793, z: -10.195508} - Rotate: {x: -0, y: 0, z: -0} + Rotate: {x: -0, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true RigidBody Component: @@ -4626,8 +4629,8 @@ NumberOfChildren: 1 Components: Transform Component: - Translate: {x: -5.47656059, y: 1.4327563, z: -2.44241929} - Rotate: {x: -0, y: 0, z: -0} + Translate: {x: -5.47656107, y: 1.4327563, z: -2.44241929} + Rotate: {x: -0, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true RigidBody Component: @@ -4689,7 +4692,7 @@ Components: Transform Component: Translate: {x: 6.09239721, y: 1.4327563, z: -6.03106117} - Rotate: {x: -0, y: 0, z: -0} + Rotate: {x: -0, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true RigidBody Component: @@ -4751,7 +4754,7 @@ Components: Transform Component: Translate: {x: 6.09239721, y: 1.4327563, z: -3.94262314} - Rotate: {x: -0, y: 0, z: -0} + Rotate: {x: -0, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true RigidBody Component: @@ -4901,7 +4904,7 @@ Components: Transform Component: Translate: {x: -8, y: 1.142977, z: -4} - Rotate: {x: -0, y: 1.57079637, z: -0} + Rotate: {x: -0, y: 1.57079649, z: 0} Scale: {x: 0.999999881, y: 1, z: 0.999999881} IsActive: true Renderable Component: @@ -4963,6 +4966,10 @@ rayHeight: 0.100000001 aimingFOV: 50 defaultFOV: 45 + - Type: StateMachine + Enabled: true + currentStateName: Idle State + currentAnimName: "" - EID: 65733 Name: HoldingPoint IsActive: true @@ -4981,13 +4988,13 @@ Components: Transform Component: Translate: {x: 0, y: -2.98023224e-08, z: 4.76837158e-07} - Rotate: {x: 0, y: 4.71238899, z: 2.23517329e-08} + Rotate: {x: -0.173316926, y: 3.1415925, z: 2.23517329e-08} Scale: {x: 1, y: 1, z: 1} IsActive: true Camera Component: - Position: {x: 2.12735963, y: 0.362327784, z: 7.98933029} - Pitch: 0 - Yaw: 360 + Position: {x: -8.9091711, y: 2.05214882, z: -4} + Pitch: -9.93032837 + Yaw: 270 Roll: 1.28065994e-06 Width: 1920 Near: 0.00999999978 @@ -4998,7 +5005,7 @@ Camera Arm Component: Arm Pitch: 45 Arm Yaw: -90 - Arm Length: 1 + Arm Length: 3 Look At Camera Origin: true Target Offset: {x: 0, y: 0.75, z: 0} Camera Collision: true @@ -5121,52 +5128,26 @@ IsActive: true NumberOfChildren: 3 Components: ~ - Scripts: ~ + Scripts: + - Type: SHADE_Scripting.UI.PreviewLevel + Enabled: true + endPoint1: [-5.5, 1.5, -2] + endPoint2: [1, 1.5, -7.5] + endPoint3: [2.5, 1.5, -3] + playerCamera: 65730 + duration: 3 - EID: 453 Name: PreviewLevel1 IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -7.59216642, y: 1.49918437, z: -1.37255788} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - Scripts: ~ -- EID: 452 - Name: PreviewLevel2 - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -3.13806891, y: 1.33345056, z: -7.42731333} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - Scripts: ~ -- EID: 451 - Name: PreviewLevel3 - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 4.74025965, y: 1.62911224, z: -7.82088184} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - Scripts: ~ -- EID: 459 - Name: PreviewLevelCamera - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0, y: 0, z: 0} + Translate: {x: -7.5, y: 1.5, z: -2} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true Camera Component: - Position: {x: 0, y: 0, z: 0} + Position: {x: -5.5, y: 1.5, z: -2} Pitch: 0 Yaw: 0 Roll: 0 @@ -5177,16 +5158,60 @@ FOV: 90 IsActive: true Scripts: ~ +- EID: 452 + Name: PreviewLevel2 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -1.5, y: 1.5, z: -7.5} + Rotate: {x: 0, y: -3.14159274, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Camera Component: + Position: {x: -0.24528563, y: 1.5, z: -7.5} + Pitch: 0 + Yaw: -180 + Roll: 0 + Width: 1920 + Near: 0.00999999978 + Far: 10000 + Perspective: true + FOV: 90 + IsActive: true + Scripts: ~ +- EID: 451 + Name: PreviewLevel3 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 2.5, y: 1.5, z: -7.5} + Rotate: {x: 0, y: 4.71238899, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Camera Component: + Position: {x: 2.5, y: 1.5, z: -7.5} + Pitch: 0 + Yaw: 270 + Roll: 0 + Width: 1920 + Near: 0.00999999978 + Far: 10000 + Perspective: true + FOV: 90 + IsActive: true + Scripts: ~ - EID: 458 Name: PauseCanvas - IsActive: true + IsActive: false NumberOfChildren: 4 Components: Canvas Component: Canvas Width: 1920 Canvas Height: 1080 Scale by canvas width: false - IsActive: true + IsActive: false Scripts: ~ - EID: 457 Name: ResumeButton @@ -5203,9 +5228,9 @@ Material: 129340704 IsActive: true Button Component: - Default Texture: 52901020 - Hovered Texture: 62235279 - Clicked Texture: 64722619 + Default Texture: 63979907 + Hovered Texture: 51379325 + Clicked Texture: 66788278 IsActive: true UI Component: Canvas ID: 458 @@ -5228,9 +5253,9 @@ Material: 129340704 IsActive: true Button Component: - Default Texture: 66477839 - Hovered Texture: 65045286 - Clicked Texture: 58607560 + Default Texture: 61602036 + Hovered Texture: 58910810 + Clicked Texture: 57786063 IsActive: true UI Component: Canvas ID: 458 @@ -5253,9 +5278,9 @@ Material: 129340704 IsActive: true Button Component: - Default Texture: 55782622 - Hovered Texture: 58972174 - Clicked Texture: 55224464 + Default Texture: 64806384 + Hovered Texture: 58347825 + Clicked Texture: 63234380 IsActive: true UI Component: Canvas ID: 458 @@ -5276,6 +5301,7 @@ Text Renderer Component: Text: Game Pause Font: 176667660 + Color: {x: 1, y: 1, z: 1, w: 1} IsActive: false UI Component: Canvas ID: 458 @@ -5302,7 +5328,7 @@ Transform Component: Translate: {x: 0, y: 0, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1920, y: 1080, z: 1} + Scale: {x: 2500, y: 1080, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -5317,5 +5343,5 @@ - Type: SHADE_Scripting.UI.SceneFadeInOut Enabled: true alphaValue: 1 - fadeInTime: 0.300000012 - fadeOutTime: 0.300000012 \ No newline at end of file + fadeInTime: 0.5 + fadeOutTime: 0.5 \ No newline at end of file diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index 2ecbec7d..3989fa4a 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -2025,9 +2025,9 @@ NumberOfChildren: 5 Components: Transform Component: - Translate: {x: 1.65356398, y: 0.333341181, z: 5.9183445} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 0.999979734, y: 1, z: 0.999979734} + Translate: {x: 1.62003577, y: 0.241820931, z: 5.90758133} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: Mesh: 134305891 @@ -2039,7 +2039,7 @@ Angular Drag: 0.100000001 Use Gravity: true Interpolate: false - Sleeping Enabled: true + Sleeping Enabled: false Freeze Position X: false Freeze Position Y: false Freeze Position Z: false @@ -2080,21 +2080,21 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0.0218036175, y: 5.38527966e-05, z: 0.202852726} - Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} + Translate: {x: 0, y: 0, z: 0} + Rotate: {x: 0, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: false Renderable Component: - Mesh: 144023586 - Material: 122370915 + Mesh: 0 + Material: 0 IsActive: false RigidBody Component: Type: Dynamic Drag: 0.00999999978 Angular Drag: 0.100000001 Use Gravity: true - Interpolate: false - Sleeping Enabled: true + Interpolate: true + Sleeping Enabled: false Freeze Position X: false Freeze Position Y: false Freeze Position Z: false @@ -2125,57 +2125,6 @@ highlightSpeed: 300 highlightThickness: 250 highlightLowerClamp: 0.25 -- EID: 524 - Name: Piece2 - IsActive: false - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0.0812162161, y: 0.0825212598, z: -0.0991339684} - Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16} - Scale: {x: 1, y: 1, z: 1} - IsActive: false - Renderable Component: - Mesh: 142132679 - Material: 122370915 - IsActive: false - RigidBody Component: - Type: Dynamic - Drag: 0.00999999978 - Angular Drag: 0.100000001 - Use Gravity: true - Interpolate: false - 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: false - Collider Component: - Colliders: - - Is Trigger: false - Collision Tag: 2 - Type: Box - Half Extents: {x: 0.300000012, 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.34906584} - IsActive: false - Scripts: - - Type: Item - Enabled: true - Score: 50 - currCategory: 1 - density: 3 - dontReturn: false - soundDistance: 10 - highlightSpeed: 300 - highlightThickness: 250 - highlightLowerClamp: 0.25 - EID: 525 Name: Piece3 IsActive: false @@ -2329,6 +2278,57 @@ highlightSpeed: 300 highlightThickness: 250 highlightLowerClamp: 0.25 +- EID: 524 + Name: Piece2 + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -1.62003577, y: -0.241820931, z: -5.90758133} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Renderable Component: + Mesh: 142132679 + Material: 122370915 + IsActive: false + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Use Gravity: true + Interpolate: false + 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: false + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.300000012, 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.34906584} + IsActive: false + Scripts: + - Type: Item + Enabled: true + Score: 50 + currCategory: 1 + density: 3 + dontReturn: false + soundDistance: 10 + highlightSpeed: 300 + highlightThickness: 250 + highlightLowerClamp: 0.25 - EID: 131228 Name: Watermelon IsActive: true @@ -3449,7 +3449,7 @@ - Type: PauseMenu Enabled: true resumeBtn: 8 - retryBtn: 461 + retryBtn: 459 quitBtn: 0 canvas: 10 - EID: 199 @@ -3476,6 +3476,7 @@ Text Renderer Component: Text: My name is Brandon. Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} IsActive: true UI Component: Canvas ID: 199 @@ -3483,7 +3484,7 @@ Clicked: false IsActive: true Scripts: ~ -- EID: 522 +- EID: 521 Name: Score BG IsActive: true NumberOfChildren: 0 @@ -3516,6 +3517,7 @@ Text Renderer Component: Text: My name is Brandon. Font: 176667660 + Color: {x: 1, y: 1, z: 1, w: 1} IsActive: true UI Component: Canvas ID: 199 @@ -3536,6 +3538,7 @@ Text Renderer Component: Text: X2 Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} IsActive: true UI Component: Canvas ID: 199 @@ -3548,7 +3551,7 @@ maxSize: 1 minSize: 0.300000012 minAlpha: 0.300000012 -- EID: 523 +- EID: 520 Name: Multiplier BG IsActive: true NumberOfChildren: 0 @@ -5763,7 +5766,7 @@ Rotation Offset: {x: 0, y: 0, z: 0} IsActive: false Scripts: ~ -- EID: 520 +- EID: 461 Name: Piece3 IsActive: false NumberOfChildren: 0 @@ -5804,7 +5807,7 @@ Rotation Offset: {x: 0, y: 0, z: 0} IsActive: false Scripts: ~ -- EID: 521 +- EID: 460 Name: Piece4 IsActive: false NumberOfChildren: 0 @@ -6107,7 +6110,7 @@ Components: Transform Component: Translate: {x: 0, y: -300, z: 0} - Rotate: {x: 0, y: 0, z: 0} + Rotate: {x: -4.5, y: 2, z: -2.5} Scale: {x: 400, y: 100, z: 500} IsActive: true Renderable Component: @@ -6133,7 +6136,7 @@ onReleaseSound: event:/Music/player_undetected hoverScale: 1.10000002 clickScale: 0.899999976 -- EID: 461 +- EID: 459 Name: RetryButton IsActive: true NumberOfChildren: 0 @@ -6179,6 +6182,7 @@ Text Renderer Component: Text: Game Pause Font: 176667660 + Color: {x: 1, y: 1, z: 1, w: 1} IsActive: false UI Component: Canvas ID: 10 @@ -11908,7 +11912,7 @@ Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ -- EID: 460 +- EID: 458 Name: Exterior IsActive: true NumberOfChildren: 5 @@ -14587,7 +14591,7 @@ Material: 131956078 IsActive: true Scripts: ~ -- EID: 458 +- EID: 174 Name: Exterior_Bush01 IsActive: true NumberOfChildren: 0 @@ -14602,7 +14606,7 @@ Material: 131956078 IsActive: true Scripts: ~ -- EID: 459 +- EID: 173 Name: Exterior_Bush02 IsActive: true NumberOfChildren: 0 @@ -14617,7 +14621,7 @@ Material: 131956078 IsActive: true Scripts: ~ -- EID: 174 +- EID: 172 Name: TweenManager IsActive: true NumberOfChildren: 0 @@ -14625,7 +14629,7 @@ Scripts: - Type: SHADE_Scripting.UI.TweenManager Enabled: true -- EID: 172 +- EID: 548 Name: StealFoodCanvas IsActive: true NumberOfChildren: 1 @@ -14636,7 +14640,7 @@ Scale by canvas width: false IsActive: true Scripts: ~ -- EID: 173 +- EID: 549 Name: StealFoodLogo IsActive: true NumberOfChildren: 0 @@ -14651,7 +14655,7 @@ Material: 127459277 IsActive: true UI Component: - Canvas ID: 172 + Canvas ID: 548 Hovered: false Clicked: false IsActive: true @@ -14664,7 +14668,7 @@ rotationAmt: 1800 scaleAmtX: 538 scaleAmtY: 377 -- EID: 548 +- EID: 550 Name: TransitionCanvas IsActive: true NumberOfChildren: 1 @@ -14675,7 +14679,7 @@ Scale by canvas width: false IsActive: true Scripts: ~ -- EID: 549 +- EID: 551 Name: Transition IsActive: true NumberOfChildren: 0 @@ -14683,14 +14687,14 @@ Transform Component: Translate: {x: 0, y: 0, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1920, y: 1080, z: 1} + Scale: {x: 2500, y: 1080, z: 1} IsActive: true Renderable Component: Mesh: 141771688 Material: 120016136 IsActive: true UI Component: - Canvas ID: 548 + Canvas ID: 550 Hovered: false Clicked: false IsActive: true @@ -14700,11 +14704,90 @@ alphaValue: 1 fadeInTime: 0.5 fadeOutTime: 0.5 -- EID: 172 +- EID: 552 Name: TweenManager IsActive: true NumberOfChildren: 0 Components: ~ Scripts: - Type: SHADE_Scripting.UI.TweenManager - Enabled: true \ No newline at end of file + Enabled: true +- EID: 553 + Name: CameraPoints + IsActive: true + NumberOfChildren: 3 + Components: ~ + Scripts: + - Type: SHADE_Scripting.UI.PreviewLevel + Enabled: true + endPoint1: [-3.5, 1.5, -4.5] + endPoint2: [0, 2, 4.5] + endPoint3: [1.14999998, 2.20000005, 2] + playerCamera: 4 + duration: 3 +- EID: 554 + Name: PreviewLevel1 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -5, y: 1.5, z: -3} + Rotate: {x: 0, y: -2.3561945, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Camera Component: + Position: {x: -5.5, y: 1.5, z: -2} + Pitch: 0 + Yaw: -135 + Roll: 0 + Width: 1920 + Near: 0.00999999978 + Far: 10000 + Perspective: true + FOV: 90 + IsActive: true + Scripts: ~ +- EID: 555 + Name: PreviewLevel2 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 3, y: 2, z: 4.5} + Rotate: {x: -0.5497787, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Camera Component: + Position: {x: -0.24528563, y: 1.5, z: -7.5} + Pitch: -31.5 + Yaw: 0 + Roll: 0 + Width: 1920 + Near: 0.00999999978 + Far: 10000 + Perspective: true + FOV: 90 + IsActive: true + Scripts: ~ +- EID: 556 + Name: PreviewLevel3 + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 1.29999995, y: 2.20000005, z: -4} + Rotate: {x: -0.34906584, y: -1.57079637, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Camera Component: + Position: {x: 2.5, y: 1.5, z: -7.5} + Pitch: -20 + Yaw: -90 + Roll: 0 + Width: 1920 + Near: 0.00999999978 + Far: 10000 + Perspective: true + FOV: 90 + IsActive: true + Scripts: ~ \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs b/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs index 1dcc0394..e23e9ff1 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs @@ -59,7 +59,7 @@ public class PickAndThrow : Script } protected override void update() { - if (GameManager.Instance.GamePause || GameManager.Instance.stealFoodPopUp) + if (GameManager.Instance.GamePause || !GameManager.Instance.stealFoodPopUpDone) { return; } @@ -142,7 +142,7 @@ public class PickAndThrow : Script protected override void fixedUpdate() { - if (GameManager.Instance.GamePause || GameManager.Instance.stealFoodPopUp) + if (GameManager.Instance.GamePause || !GameManager.Instance.stealFoodPopUpDone) { return; } diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index 9781f466..d3cc3f66 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -139,7 +139,7 @@ public class PlayerController : Script protected override void update() { - if (GameManager.Instance.GamePause || GameManager.Instance.stealFoodPopUp) + if (GameManager.Instance.GamePause || !GameManager.Instance.stealFoodPopUpDone) { return; } @@ -189,7 +189,7 @@ public class PlayerController : Script protected override void fixedUpdate() { - if (GameManager.Instance.GamePause || GameManager.Instance.stealFoodPopUp) + if (GameManager.Instance.GamePause || !GameManager.Instance.stealFoodPopUpDone) { return; } diff --git a/Assets/Scripts/Gameplay/Player/SC_ThirdPersonCamera.cs b/Assets/Scripts/Gameplay/Player/SC_ThirdPersonCamera.cs index d135b32f..71cb31a4 100644 --- a/Assets/Scripts/Gameplay/Player/SC_ThirdPersonCamera.cs +++ b/Assets/Scripts/Gameplay/Player/SC_ThirdPersonCamera.cs @@ -41,7 +41,7 @@ namespace SHADE_Scripting protected override void update() { - if (GameManager.Instance.GamePause || GameManager.Instance.stealFoodPopUp) + if (GameManager.Instance.GamePause || !GameManager.Instance.stealFoodPopUpDone) { return; } diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index a5906fea..f9f453f4 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -41,7 +41,8 @@ public class GameManager : Script public static GameManager Instance { get; private set; } public bool GamePause { get; set; } - public bool stealFoodPopUp { get; set; } + public bool stealFoodPopUpDone { get; set; } + public bool PreviewLevelDone { get; set; } public bool itemShatter { get; set; } @@ -65,7 +66,8 @@ public class GameManager : Script fontScalar = new Vector3(multiplierFont / maxMultiplierDuration, multiplierFont / maxMultiplierDuration , multiplierFont / maxMultiplierDuration); itemShatter = false; GamePause = false; - stealFoodPopUp = true; + stealFoodPopUpDone = false; + PreviewLevelDone = false; AudioHandler.audioClipHandlers["BGMWin"] = Audio.CreateAudioClip("event:/Music/stingers/game_win"); AudioHandler.audioClipHandlers["BGMLose"] = Audio.CreateAudioClip("event:/Music/stingers/game_lose"); @@ -98,7 +100,7 @@ public class GameManager : Script protected override void update() { - if (GamePause || stealFoodPopUp) + if (GamePause || !stealFoodPopUpDone) { return; } diff --git a/Assets/Scripts/Gameplay/SC_PreviewLevel.cs b/Assets/Scripts/Gameplay/SC_PreviewLevel.cs index c2e690a1..7efee8c9 100644 --- a/Assets/Scripts/Gameplay/SC_PreviewLevel.cs +++ b/Assets/Scripts/Gameplay/SC_PreviewLevel.cs @@ -3,45 +3,156 @@ using System; using System.Collections.Generic; using System.Linq; -public class PreviewLevel : Script + +namespace SHADE_Scripting.UI { - public GameObject previewLevelPoints; - private List listOfpreviewLevelPoints; - - private Transform tran; - - public Vector3 endPoint1; - public Vector3 endPoint2; - public Vector3 endPoint3; - public float duration = 3.0f; - - private bool point1Done; - private bool point2Done; - private bool point3Done; - - protected override void awake() + public class PreviewLevel : Script { - //GetComponent().SetMainCamera(); + private List listOfCamera; - if (previewLevelPoints) - listOfpreviewLevelPoints = previewLevelPoints.GetComponentsInChildren().ToList(); - else - Debug.LogError("MISSING PREVIEW POINTS"); + public Vector3 endPoint1; + public Vector3 endPoint2; + public Vector3 endPoint3; - if(listOfpreviewLevelPoints.Count == 0) - Debug.LogError("EMPTY PREVIEW POINTS"); + public GameObject playerCamera; + public float duration = 3.0f; - tran = GetComponent(); - if (!tran) - Debug.LogError("MISSING PREVIEW TRANSFORM"); - else - tran.LocalPosition = listOfpreviewLevelPoints[0].LocalPosition; + private bool point1Done = false; + private bool point2Done = false; + private bool point3Done = false; + + private bool reset2 = true; + private bool reset3 = true; + + private bool skip = false; + [NonSerialized] + private TweenThreadVec3 moveToEndPoint1; + [NonSerialized] + private TweenThreadVec3 moveToEndPoint2; + [NonSerialized] + private TweenThreadVec3 moveToEndPoint3; + + protected override void awake() + { + listOfCamera = GameObject.GetComponentsInChildren().ToList(); + + if (listOfCamera.Count == 0) + Debug.LogError("EMPTY PREVIEW POINTS"); + + listOfCamera[0].SetMainCamera(); + + moveToEndPoint1 = TweenManager.CreateTweenThreadVec3(duration, listOfCamera[0].GetComponent().LocalPosition, endPoint1, EASING_METHOD.EASE_IN_SINE); + moveToEndPoint2 = TweenManager.CreateTweenThreadVec3(duration, listOfCamera[1].GetComponent().LocalPosition, endPoint2, EASING_METHOD.EASE_IN_SINE); + moveToEndPoint3 = TweenManager.CreateTweenThreadVec3(duration, listOfCamera[2].GetComponent().LocalPosition, endPoint3, EASING_METHOD.EASE_IN_SINE); + + + } + + protected override void update() + { + if (!SceneFadeInOut.Instance.FadeOutFinished() && !point1Done) + { + moveToEndPoint1.Reset(); + return; + } + + if (Input.GetKeyUp(Input.KeyCode.Space)) + { + skip = true; + point1Done = true; + SceneFadeInOut.Instance.CallFadeIn(); + SceneFadeInOut.Instance.alphaValue = 0.01f; + } + + if (skip && SceneFadeInOut.Instance.FadeInFinished()) + { + playerCamera.GetComponent().SetMainCamera(); + SceneFadeInOut.Instance.CallFadeOut(); + } + + if (skip && SceneFadeInOut.Instance.FadeOutFinished()) + { + GameManager.Instance.PreviewLevelDone = true; + } + + + if (!skip) + { + if (!point1Done) + { + listOfCamera[0].GetComponent().LocalPosition = moveToEndPoint1.GetValue(); + if (moveToEndPoint1.IsCompleted()) + { + point1Done = true; + SceneFadeInOut.Instance.CallFadeIn(); + SceneFadeInOut.Instance.alphaValue = 0.01f; + } + } + + if (SceneFadeInOut.Instance.FadeInFinished() && point1Done) + { + listOfCamera[1].SetMainCamera(); + SceneFadeInOut.Instance.CallFadeOut(); + } + + if (SceneFadeInOut.Instance.FadeOutFinished() && point1Done) + { + if (!point2Done) + { + if (reset2) + { + moveToEndPoint2.Reset(); + reset2 = false; + } + listOfCamera[1].GetComponent().LocalPosition = moveToEndPoint2.GetValue(); + if (moveToEndPoint2.IsCompleted()) + { + point2Done = true; + SceneFadeInOut.Instance.CallFadeIn(); + SceneFadeInOut.Instance.alphaValue = 0.01f; + } + } + } + + if (SceneFadeInOut.Instance.FadeInFinished() && point2Done) + { + listOfCamera[2].SetMainCamera(); + SceneFadeInOut.Instance.CallFadeOut(); + } + + if (SceneFadeInOut.Instance.FadeOutFinished() && point2Done) + { + if (!point3Done) + { + if (reset3) + { + moveToEndPoint3 = TweenManager.CreateTweenThreadVec3(duration, listOfCamera[2].GetComponent().LocalPosition, endPoint3, EASING_METHOD.EASE_IN_SINE); + reset3 = false; + } + listOfCamera[2].GetComponent().LocalPosition = moveToEndPoint3.GetValue(); + if (moveToEndPoint3.IsCompleted()) + { + point3Done = true; + SceneFadeInOut.Instance.CallFadeIn(); + SceneFadeInOut.Instance.alphaValue = 0.01f; + } + } + } + + if (SceneFadeInOut.Instance.FadeInFinished() && point3Done) + { + playerCamera.GetComponent().SetMainCamera(); + SceneFadeInOut.Instance.CallFadeOut(); + } + + if (SceneFadeInOut.Instance.FadeOutFinished() && point3Done) + { + GameManager.Instance.PreviewLevelDone = true; + } + } + + } } - - protected override void update() - { - } - } diff --git a/Assets/Scripts/UI/EasingHelper.cs b/Assets/Scripts/UI/EasingHelper.cs index d0480f7a..0b434833 100644 --- a/Assets/Scripts/UI/EasingHelper.cs +++ b/Assets/Scripts/UI/EasingHelper.cs @@ -52,12 +52,12 @@ namespace SHADE_Scripting.UI private static float EaseInSine(float value) { - return (float)(1.0f - Math.Cos((value * Math.PI) / 2.0f)); + return (float)(1.0f - Math.Cos((value * Math.PI / 2.0f))); } private static float EaseOutSine(float value) { - return (float)(Math.Sin(value * Math.PI) / 2.0f); + return (float)(Math.Sin(value * Math.PI / 2.0f)); } diff --git a/Assets/Scripts/UI/SC_PauseMenu.cs b/Assets/Scripts/UI/SC_PauseMenu.cs index 0293bb69..c92965d8 100644 --- a/Assets/Scripts/UI/SC_PauseMenu.cs +++ b/Assets/Scripts/UI/SC_PauseMenu.cs @@ -88,7 +88,7 @@ public class PauseMenu : Script protected override void update() { - if (Input.GetKeyDown(Input.KeyCode.Escape) && !GameManager.Instance.GamePause && !GameManager.Instance.stealFoodPopUp) + if (Input.GetKeyDown(Input.KeyCode.Escape) && !GameManager.Instance.GamePause && GameManager.Instance.stealFoodPopUpDone) { GameManager.Instance.GamePause = true; AudioHandler.PauseAllSounds(true); diff --git a/Assets/Scripts/UI/SC_SceneFadeInOut.cs b/Assets/Scripts/UI/SC_SceneFadeInOut.cs index 4224474b..15047e49 100644 --- a/Assets/Scripts/UI/SC_SceneFadeInOut.cs +++ b/Assets/Scripts/UI/SC_SceneFadeInOut.cs @@ -65,7 +65,6 @@ namespace SHADE_Scripting.UI if (alphaValue >= 1.0f) { alphaValue = 1.0f; - GameObject.Parent.SetActive(false); } } diff --git a/Assets/Scripts/UI/SC_StealFoodPopUp.cs b/Assets/Scripts/UI/SC_StealFoodPopUp.cs index f7f8b75a..6991ed32 100644 --- a/Assets/Scripts/UI/SC_StealFoodPopUp.cs +++ b/Assets/Scripts/UI/SC_StealFoodPopUp.cs @@ -51,7 +51,7 @@ namespace SHADE_Scripting.UI //538x377 protected override void update() { - if (!SceneFadeInOut.Instance.FadeOutFinished()) + if (!GameManager.Instance.PreviewLevelDone) { rot.Reset(); scaleX.Reset(); @@ -86,7 +86,7 @@ namespace SHADE_Scripting.UI if (scaleOutX.IsCompleted() && scaleOutY.IsCompleted()) { GameObject.SetActive(false); - GameManager.Instance.stealFoodPopUp = false; + GameManager.Instance.stealFoodPopUpDone = true; } } } diff --git a/SHADE_Engine/src/Serialization/SHSerializationHelper.hpp b/SHADE_Engine/src/Serialization/SHSerializationHelper.hpp index a4936528..35e27132 100644 --- a/SHADE_Engine/src/Serialization/SHSerializationHelper.hpp +++ b/SHADE_Engine/src/Serialization/SHSerializationHelper.hpp @@ -207,10 +207,10 @@ namespace SHADE if constexpr (YAML::HasYAMLConv()) { auto component = SHComponentManager::GetComponent_s(eid); - if (componentsNode.IsNull() || !component) + if (!component) return false; auto componentNode = GetComponentNode(componentsNode, eid); - if (componentNode.IsNull() || !componentNode.IsDefined()) + if (!componentNode.IsDefined()) return false; if (componentNode[IsActive.data()].IsDefined()) component->isActive = componentNode[IsActive.data()].as(); @@ -220,7 +220,7 @@ namespace SHADE else { ComponentType* component = SHComponentManager::GetComponent_s(eid); - if (componentsNode.IsNull() && !component) + if (!component) return false; auto rttrType = rttr::type::get(); auto componentNode = componentsNode[rttrType.get_name().data()]; From 6779f48b5a2f6603fc22c2b42e95a2416a15da91 Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Thu, 2 Mar 2023 17:33:02 +0800 Subject: [PATCH 10/11] Fixed typo --- .../EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp b/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp index c2ccdb86..c8b32dff 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp @@ -28,7 +28,7 @@ of DigiPen Institute of Technology is prohibited. namespace SHADE { /*-----------------------------------------------------------------------------------*/ - /* SHAnimClipCreatePrompt - Cosntructors/Destructors */ + /* SHAnimClipCreatePrompt - Constructors/Destructors */ /*-----------------------------------------------------------------------------------*/ SHAnimClipCreatePrompt::SHAnimClipCreatePrompt() : SHPopUpWindow("Create Animation Clip", true, 0, 0) {} From 69fa0d4da03bc7af71085eaaeed3aa9a77e7a52b Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Thu, 2 Mar 2023 17:44:28 +0800 Subject: [PATCH 11/11] Fixed SHRawAnimInspector warnings --- .../EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp | 2 +- .../EditorWindow/RawAnimationInspector/SHRawAnimInspector.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp b/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp index c8b32dff..0734121e 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.cpp @@ -63,7 +63,7 @@ namespace SHADE SHEditorUI::PopID(); // Invalid values - const bool INVALID_CONFIG = newAssetName.empty() || firstIndex > lastIndex || lastIndex < firstIndex; + const bool INVALID_CONFIG = newAssetName.empty() || firstIndex > lastIndex; // Buttons ImGui::BeginDisabled(INVALID_CONFIG); diff --git a/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.h b/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.h index c2006d87..1b3c4855 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.h +++ b/SHADE_Engine/src/Editor/EditorWindow/RawAnimationInspector/SHRawAnimInspector.h @@ -43,8 +43,8 @@ namespace SHADE /* Data Members */ /*---------------------------------------------------------------------------------*/ std::string newAssetName; - int firstIndex; - int lastIndex; + int firstIndex = 0; + int lastIndex = 0; Handle rawAnimation; };