diff --git a/Assets/Materials/UIMat_Transistion.shmat b/Assets/Materials/UIMat_Transistion.shmat new file mode 100644 index 00000000..df7542ba --- /dev/null +++ b/Assets/Materials/UIMat_Transistion.shmat @@ -0,0 +1,8 @@ +- VertexShader: 46580970 + FragmentShader: 40208610 + SubPass: UI + Properties: + data.color: {x: 1, y: 1, z: 1, w: 1} + data.textureIndex: 50770098 + data.alpha: 1 + data.beta: {x: 1, y: 1, z: 1} \ No newline at end of file diff --git a/Assets/Materials/UIMat_Transistion.shmat.shmeta b/Assets/Materials/UIMat_Transistion.shmat.shmeta new file mode 100644 index 00000000..4e79799a --- /dev/null +++ b/Assets/Materials/UIMat_Transistion.shmat.shmeta @@ -0,0 +1,3 @@ +Name: UIMat_Transistion +ID: 132131066 +Type: 7 diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index 019b946d..1344d8b2 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -6864,7 +6864,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -6906,7 +6906,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -6948,7 +6948,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -6990,7 +6990,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -8811,7 +8811,7 @@ popInDuration: 0.5 popOutDuration: 0.075000003 stayDuration: 1 - rotationAmt: 1800 + rotationAmt: 360 scaleAmtX: 538 scaleAmtY: 377 - EID: 463 @@ -8830,11 +8830,12 @@ Scripts: - Type: SHADE_Scripting.UI.PreviewLevel Enabled: true + levelTransistion: 619 endPoint1: [-5.5, 1.5, -2] endPoint2: [1, 1.5, -7.5] endPoint3: [2.5, 1.5, -3] playerCamera: 65730 - gameplayCanvas: 459 + gameplayCanvas: 131271 duration: 3 - EID: 453 Name: PreviewLevel1 @@ -9401,7 +9402,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 0.300000012, z: 0.98999995} + Translate: {x: 0, y: 0.300000012, z: 0.699999988} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 5, y: 2, z: 1} IsActive: true @@ -9421,7 +9422,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: -0.800000012, z: 0.100000001} + Translate: {x: 0, y: -0.800000012, z: 0.600000024} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: false @@ -9446,12 +9447,12 @@ NumberOfChildren: 1 Components: Transform Component: - Translate: {x: -800, y: 200, z: 0.100000001} + Translate: {x: -800, y: 200, z: 0.600000024} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 50, y: 50, z: 60} IsActive: true Text Renderer Component: - Text: X2 + Text: X0 Font: 174412429 Color: {x: 1, y: 1, z: 1, w: 1} Text Size: {x: 1, y: 1, z: 1} @@ -9472,7 +9473,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0.400000006, y: 0.400000006, z: 0.98999995} + Translate: {x: 0.400000006, y: 0.400000006, z: 0.699999988} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 4.26499987, y: 2, z: 1} IsActive: true @@ -9494,7 +9495,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -770, y: 425, z: 59.9999962} + Translate: {x: -770, y: 425, z: 0.699999988} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 345.600006, y: 200, z: 60} IsActive: true @@ -9668,4 +9669,65 @@ Hovered: false Clicked: false IsActive: true + Scripts: ~ +- EID: 619 + Name: LevelTransistionCanvas + IsActive: true + NumberOfChildren: 2 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: + - Type: LevelTransistion + Enabled: true + logo: 618 + bg: 617 + duration: 0.5 + bgEndPositionX: 3000 + logoEndPositionX: 3000 + rotAndScale: false + rotationAmt: 360 + scaleAmt: 631 +- EID: 618 + Name: LevelTransistionLogo + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 631, y: 631, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 126117259 + IsActive: true + UI Component: + Canvas ID: 619 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 617 + Name: LevelTransistionBG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.200000003} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 4000, y: 4000, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 132131066 + IsActive: true + UI Component: + Canvas ID: 619 + 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 376d3b66..d62f1dd1 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -15956,7 +15956,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -16124,7 +16124,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -17026,7 +17026,7 @@ popInDuration: 0.5 popOutDuration: 0.075000003 stayDuration: 1 - rotationAmt: 1800 + rotationAmt: 360 scaleAmtX: 538 scaleAmtY: 377 - EID: 551 @@ -17081,11 +17081,12 @@ Scripts: - Type: SHADE_Scripting.UI.PreviewLevel Enabled: true + levelTransistion: 609 endPoint1: [-3.5, 1.5, -4.5] endPoint2: [0, 2, 4.5] endPoint3: [1.14999998, 2.20000005, 2] playerCamera: 4 - gameplayCanvas: 199 + gameplayCanvas: 131271 duration: 3 - EID: 555 Name: PreviewLevel1 @@ -17232,7 +17233,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 0.300000012, z: 0.98999995} + Translate: {x: 0, y: 0.300000012, z: 0.699999988} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 5, y: 2, z: 1} IsActive: true @@ -17252,7 +17253,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: -0.800000012, z: 0.100000001} + Translate: {x: 0, y: -0.800000012, z: 0.600000024} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: false @@ -17277,12 +17278,12 @@ NumberOfChildren: 1 Components: Transform Component: - Translate: {x: -800, y: 200, z: 0.100000001} + Translate: {x: -800, y: 200, z: 0.600000024} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 50, y: 50, z: 60} IsActive: true Text Renderer Component: - Text: X2 + Text: X0 Font: 174412429 Color: {x: 1, y: 1, z: 1, w: 1} Text Size: {x: 1, y: 1, z: 1} @@ -17303,7 +17304,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0.400000006, y: 0.400000006, z: 0.98999995} + Translate: {x: 0.400000006, y: 0.400000006, z: 0.699999988} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 4.26499987, y: 2, z: 1} IsActive: true @@ -17325,7 +17326,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -770, y: 425, z: 59.9999962} + Translate: {x: -770, y: 425, z: 0.699999988} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 345.600006, y: 200, z: 60} IsActive: true @@ -17634,4 +17635,65 @@ Hovered: false Clicked: false IsActive: true + Scripts: ~ +- EID: 609 + Name: LevelTransistionCanvas + IsActive: true + NumberOfChildren: 2 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: + - Type: LevelTransistion + Enabled: true + logo: 608 + bg: 607 + duration: 0.5 + bgEndPositionX: 3000 + logoEndPositionX: 3000 + rotAndScale: false + rotationAmt: 360 + scaleAmt: 631 +- EID: 608 + Name: LevelTransistionLogo + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 631, y: 631, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 126117259 + IsActive: true + UI Component: + Canvas ID: 609 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 607 + Name: LevelTransistionBG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.200000003} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 4000, y: 4000, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 132131066 + IsActive: true + UI Component: + Canvas ID: 609 + Hovered: false + Clicked: false + IsActive: true Scripts: ~ \ No newline at end of file diff --git a/Assets/Scenes/Level3.shade b/Assets/Scenes/Level3.shade index a65d0a77..4e38179d 100644 --- a/Assets/Scenes/Level3.shade +++ b/Assets/Scenes/Level3.shade @@ -8802,7 +8802,7 @@ popInDuration: 0.5 popOutDuration: 0.075000003 stayDuration: 1 - rotationAmt: 1800 + rotationAmt: 360 scaleAmtX: 538 scaleAmtY: 377 - EID: 547 @@ -9379,11 +9379,12 @@ Scripts: - Type: SHADE_Scripting.UI.PreviewLevel Enabled: true + levelTransistion: 230 endPoint1: [-1.79999995, 1.5, 0.5] endPoint2: [5, 3.5, 0.5] endPoint3: [-0.5, 1.5, 3.5] playerCamera: 66063 - gameplayCanvas: 526 + gameplayCanvas: 66062 duration: 3 - EID: 555 Name: PreviewLevel1 @@ -12823,7 +12824,7 @@ NumberOfChildren: 8 Components: Transform Component: - Translate: {x: 5.5, y: 0.300000012, z: 10} + Translate: {x: 5.5, y: 0.0124755427, z: 10} Rotate: {x: -0, y: -3.1415925, z: 0} Scale: {x: 0.999999404, y: 1, z: 0.999999404} IsActive: true @@ -14463,7 +14464,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -14505,7 +14506,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -14547,7 +14548,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -14589,7 +14590,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -14823,7 +14824,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -14865,7 +14866,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -14907,7 +14908,7 @@ Half Extents: {x: 0.200000003, y: 0.200000003, z: 0.200000003} Friction: 0.400000006 Bounciness: 0 - Density: 1 + Density: 2 Position Offset: {x: 0, y: 0.100000001, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true @@ -15750,12 +15751,12 @@ NumberOfChildren: 1 Components: Transform Component: - Translate: {x: -800, y: 200, z: 0.100000001} + Translate: {x: -800, y: 200, z: 0.600000024} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 50, y: 50, z: 60} IsActive: true Text Renderer Component: - Text: X2 + Text: X0 Font: 174412429 Color: {x: 1, y: 1, z: 1, w: 1} Text Size: {x: 1, y: 1, z: 1} @@ -15972,4 +15973,65 @@ Hovered: false Clicked: false IsActive: true + Scripts: ~ +- EID: 230 + Name: LevelTransistionCanvas + IsActive: true + NumberOfChildren: 2 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: + - Type: LevelTransistion + Enabled: true + logo: 229 + bg: 228 + duration: 0.5 + bgEndPositionX: 3000 + logoEndPositionX: 3000 + rotAndScale: false + rotationAmt: 360 + scaleAmt: 631 +- EID: 229 + Name: LevelTransistionLogo + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 631, y: 631, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 126117259 + IsActive: true + UI Component: + Canvas ID: 230 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 228 + Name: LevelTransistionBG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.200000003} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 4000, y: 4000, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 132131066 + IsActive: true + UI Component: + Canvas ID: 230 + Hovered: false + Clicked: false + IsActive: true Scripts: ~ \ No newline at end of file diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index d3ddd940..57ea52f2 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -55,6 +55,7 @@ minScale: 1 maxScale: 1.20000005 duration: 1.5 + isActive: true - EID: 54 Name: Main Menu Button Group IsActive: true @@ -1440,7 +1441,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -800, y: 450, z: 0} + Translate: {x: -800, y: 450, z: 0.300000012} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 273, y: 100, z: 1} IsActive: true @@ -1476,7 +1477,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -250, y: 400, z: 0.100000001} + Translate: {x: -250, y: 400, z: 0.300000012} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 100, y: 100, z: 1} IsActive: true @@ -1536,7 +1537,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -600, y: 0, z: 0} + Translate: {x: -600, y: 0, z: 0.300000012} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 345, y: 800, z: 1} IsActive: true @@ -1557,7 +1558,8 @@ Scripts: - Type: ChangeSceneButton Enabled: true - sceneID: 91947920 + sceneID: 96668835 + levelTransistion: 433 - Type: SHADE_Scripting.UI.ButtonFX Enabled: true onHoverEnterSound: event:/UI/botton_hover @@ -1572,7 +1574,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 0, z: 0} + Translate: {x: 0, y: 0, z: 0.300000012} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 345, y: 800, z: 1} IsActive: true @@ -1594,6 +1596,7 @@ - Type: ChangeSceneButton Enabled: true sceneID: 86098106 + levelTransistion: 433 - Type: SHADE_Scripting.UI.ButtonFX Enabled: true onHoverEnterSound: event:/UI/botton_hover @@ -1608,7 +1611,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 600, y: 0, z: 0} + Translate: {x: 600, y: 0, z: 0.300000012} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 345, y: 800, z: 1} IsActive: true @@ -1630,6 +1633,7 @@ - Type: ChangeSceneButton Enabled: true sceneID: 88928066 + levelTransistion: 433 - Type: SHADE_Scripting.UI.ButtonFX Enabled: true onHoverEnterSound: event:/UI/botton_hover @@ -1640,14 +1644,14 @@ clickScale: 0.899999976 - EID: 450 Name: TransitionCanvas - IsActive: false + IsActive: true NumberOfChildren: 1 Components: Canvas Component: Canvas Width: 1920 Canvas Height: 1080 Scale by canvas width: false - IsActive: false + IsActive: true Scripts: ~ - EID: 65982 Name: Transition @@ -1673,4 +1677,65 @@ Enabled: true alphaValue: 0 fadeInTime: 0.5 - fadeOutTime: 0.5 \ No newline at end of file + fadeOutTime: 0.5 +- EID: 433 + Name: LevelTransistionCanvas + IsActive: false + NumberOfChildren: 2 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: false + Scripts: + - Type: LevelTransistion + Enabled: true + logo: 431 + bg: 432 + duration: 0.800000012 + bgEndPositionX: 0 + logoEndPositionX: 0 + rotAndScale: true + rotationAmt: 360 + scaleAmt: 631 +- EID: 431 + Name: LevelTransistionLogo + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 0, y: 0, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 126117259 + IsActive: true + UI Component: + Canvas ID: 433 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 432 + Name: LevelTransistionBG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -2500, y: 0, z: 0.200000003} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 4000, y: 4000, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 132131066 + IsActive: true + UI Component: + Canvas ID: 433 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index 59a56106..2fcdda76 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -67,7 +67,7 @@ public class GameManager : Script Score = 0; currGameState = GameState.START; itemScored = false; - currMultiplierCombo = 1; + currMultiplierCombo = 0; currMultiplierDuration = 0; itemShatter = false; GamePause = false; @@ -108,9 +108,6 @@ public class GameManager : Script AudioHandler.audioClipHandlers["KitchenAmbience"] = Audio.CreateAudioClip("event:/Ambience/roomtone_kitchen"); AudioHandler.audioClipHandlers["KitchenAmbience"].Play(); - if (SceneFadeInOut.Instance != null) - SceneFadeInOut.Instance.CallFadeOut(); - GamePause = false; } @@ -145,7 +142,7 @@ public class GameManager : Script if (currMultiplierDuration >= maxMultiplierDuration) { itemScored = false; - currMultiplierCombo = 1; + currMultiplierCombo = 0; currMultiplierDuration = 0; } } diff --git a/Assets/Scripts/Gameplay/SC_PreviewLevel.cs b/Assets/Scripts/Gameplay/SC_PreviewLevel.cs index e2a1badd..711c3108 100644 --- a/Assets/Scripts/Gameplay/SC_PreviewLevel.cs +++ b/Assets/Scripts/Gameplay/SC_PreviewLevel.cs @@ -9,6 +9,7 @@ namespace SHADE_Scripting.UI public class PreviewLevel : Script { private List listOfCamera; + public GameObject levelTransistion; public Vector3 endPoint1; public Vector3 endPoint2; @@ -56,7 +57,7 @@ namespace SHADE_Scripting.UI protected override void update() { - if (SceneFadeInOut.Instance && !SceneFadeInOut.Instance.FadeOutFinished() && !point1Done) + if (SceneFadeInOut.Instance && !levelTransistion.GetScript().complete && !point1Done) { moveToEndPoint1.Reset(); return; diff --git a/Assets/Scripts/UI/EasingHelper.cs b/Assets/Scripts/UI/EasingHelper.cs index 4e20d3e0..10f3ecb9 100644 --- a/Assets/Scripts/UI/EasingHelper.cs +++ b/Assets/Scripts/UI/EasingHelper.cs @@ -4,15 +4,17 @@ using System.Linq; using System.Text; using System.Threading.Tasks; - public enum EASING_METHOD - { - EASE_IN_SINE, - EASE_OUT_SINE, - EASE_OUT_BOUNCE, - EASE_IN_BOUNCE, - EASE_INOUT_BOUNCE, - LINEAR - } +public enum EASING_METHOD +{ + EASE_IN_SINE, + EASE_OUT_SINE, + EASE_OUT_BOUNCE, + EASE_IN_BOUNCE, + EASE_INOUT_BOUNCE, + EASE_OUT_CIRCLE, + EASE_OUT_BACK, + LINEAR +} public static class EasingHelper { @@ -25,33 +27,41 @@ public static class EasingHelper { return EaseInSine(value); } - + case EASING_METHOD.EASE_OUT_SINE: { return EaseOutSine(value); } - + case EASING_METHOD.EASE_OUT_BOUNCE: { return EaseOutBounce(value); } - + case EASING_METHOD.EASE_IN_BOUNCE: { return EaseInBounce(value); } - + case EASING_METHOD.EASE_INOUT_BOUNCE: { return EaseInOutBounce(value); } - + case EASING_METHOD.LINEAR: - { - return value; - } - - default: + { + return value; + } + case EASING_METHOD.EASE_OUT_CIRCLE: + { + return EaseOutCircle(value); + } + case EASING_METHOD.EASE_OUT_BACK: + { + return EaseOutBack(value); + } + + default: return 0.0f; } } @@ -102,5 +112,18 @@ public static class EasingHelper : (1.0f + EaseOutBounce(2.0f * value - 1.0f)) / 2.0f; } + + private static float EaseOutCircle(float value) + { + return (float)Math.Sqrt(1.0f - (float)Math.Pow(value - 1.0f, 2.0f)); + } + + private static float EaseOutBack(float value) + { + const float c1 = 1.70158f; + const float c3 = c1 + 1.0f; + return 1.0f + c3 * (float)Math.Pow(value - 1.0f, 3.0f) + c1 * (float)Math.Pow(value - 1.0f, 2.0f); + } + } diff --git a/Assets/Scripts/UI/SC_ChangeSceneButton.cs b/Assets/Scripts/UI/SC_ChangeSceneButton.cs index 09e4cf5b..16e181ae 100644 --- a/Assets/Scripts/UI/SC_ChangeSceneButton.cs +++ b/Assets/Scripts/UI/SC_ChangeSceneButton.cs @@ -5,43 +5,43 @@ using SHADE_Scripting.UI; public class ChangeSceneButton : Script { - public uint sceneID = 0; + public uint sceneID = 0; - //Whether the scene changing button has been clicked - private bool clickedFlag; + public GameObject levelTransistion; - protected override void awake() - { - clickedFlag = false; - } + private bool clickedFlag; - protected override void start() + protected override void awake() + { + clickedFlag = false; + } + + protected override void start() + { + UIElement ui = GetComponent(); + if (ui != null) { - UIElement ui = GetComponent(); - if (ui != null) + ui.OnRelease.RegisterAction(() => + { + if (sceneID != 0) { - ui.OnRelease.RegisterAction(() => - { - if (sceneID != 0) - { - Audio.PlaySFXOnce2D("event:/UI/success"); - Audio.StopAllSounds(); - if (SceneFadeInOut.Instance != null) - SceneFadeInOut.Instance.CallFadeIn(); - clickedFlag = true; - } - }); - } - else - { - Debug.LogError("Failed to register button action for ChangeSceneButton."); + Audio.PlaySFXOnce2D("event:/UI/success"); + Audio.StopAllSounds(); + clickedFlag = true; + levelTransistion.SetActive(true); } + }); } - protected override void update() + else { - if (clickedFlag && sceneID != 0 && SceneFadeInOut.Instance.FadeInFinished()) - { - SceneManager.ChangeScene(sceneID); - } + Debug.LogError("Failed to register button action for ChangeSceneButton."); } + } + protected override void update() + { + if (levelTransistion.GetScript().complete && clickedFlag) + { + SceneManager.ChangeScene(sceneID); + } + } } diff --git a/Assets/Scripts/UI/SC_LevelTransistion.cs b/Assets/Scripts/UI/SC_LevelTransistion.cs new file mode 100644 index 00000000..7883e92e --- /dev/null +++ b/Assets/Scripts/UI/SC_LevelTransistion.cs @@ -0,0 +1,75 @@ +using SHADE; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + + +public class LevelTransistion : Script +{ + + public GameObject logo; + public GameObject bg; + public float duration = 2.0f; + public float bgEndPositionX = 2500; + public float logoEndPositionX = 2500; + + public bool rotAndScale = true; + public float rotationAmt = 360; + public float scaleAmt = 631; + + public bool complete { get; set; } + + private Transform logoTran; + private Transform bgTran; + + private TweenThread bgTween; + private TweenThread logoTween; + private TweenThread rot; + private TweenThread scale; + + protected override void awake() + { + logoTran = logo.GetComponent(); + if (!logoTran) + Debug.LogError("MISSING LOGO TRAN"); + + bgTran = bg.GetComponent(); + if (!bgTran) + Debug.LogError("MISSING BG TRAN"); + + complete = false; + } + + protected override void start() + { + bgTween = TweenManager.CreateTweenThread(duration, bgTran.LocalPosition.x, bgEndPositionX, EASING_METHOD.EASE_OUT_CIRCLE); + logoTween = TweenManager.CreateTweenThread(duration , logoTran.LocalPosition.x, logoEndPositionX, EASING_METHOD.EASE_OUT_CIRCLE); + rot = TweenManager.CreateTweenThread(duration , 0, rotationAmt, EASING_METHOD.EASE_OUT_BACK); + scale = TweenManager.CreateTweenThread(duration, 0, scaleAmt, EASING_METHOD.EASE_OUT_BACK); + } + + protected override void update() + { + if (bgTween != null) + bgTran.LocalPosition = new Vector3(bgTween.GetValue(), 0, bgTran.LocalPosition.z); + + if (rotAndScale) + { + logoTran.LocalScale = new Vector3(scale.GetValue(), scale.GetValue(), 1); + logoTran.LocalEulerAngles = new Vector3(0, 0, SHADE.Math.DegreesToRadians(rot.GetValue())); + } + else + { + logoTran.LocalPosition = new Vector3(logoTween.GetValue(), 0, logoTran.LocalPosition.z); + } + + if (bgTween.IsCompleted() && logoTween.IsCompleted()) + complete = true; + } + + + +} + diff --git a/Assets/Scripts/UI/SC_LevelTransistion.cs.shmeta b/Assets/Scripts/UI/SC_LevelTransistion.cs.shmeta new file mode 100644 index 00000000..467f890f --- /dev/null +++ b/Assets/Scripts/UI/SC_LevelTransistion.cs.shmeta @@ -0,0 +1,3 @@ +Name: SC_LevelTransistion +ID: 158044875 +Type: 9 diff --git a/Assets/Scripts/UI/SC_MainMenu.cs b/Assets/Scripts/UI/SC_MainMenu.cs index 33958118..35ab9e81 100644 --- a/Assets/Scripts/UI/SC_MainMenu.cs +++ b/Assets/Scripts/UI/SC_MainMenu.cs @@ -26,7 +26,8 @@ public class MainMenu : Script { Input.SetMouseCentering(false); Application.IsCursorVisible = true; - SceneFadeInOut.Instance.CallFadeOut(); + if(SceneFadeInOut.Instance) + SceneFadeInOut.Instance.CallFadeOut(); } protected override void update() { diff --git a/Assets/Scripts/UI/SC_StealFoodPopUp.cs b/Assets/Scripts/UI/SC_StealFoodPopUp.cs index bcfc8cbc..d8cd7f7a 100644 --- a/Assets/Scripts/UI/SC_StealFoodPopUp.cs +++ b/Assets/Scripts/UI/SC_StealFoodPopUp.cs @@ -35,9 +35,9 @@ public class StealFoodPopUp : Script protected override void start() { - rot = TweenManager.CreateTweenThread(popInDuration, 0, rotationAmt, EASING_METHOD.EASE_IN_SINE); - scaleX = TweenManager.CreateTweenThread(popInDuration, 0, scaleAmtX, EASING_METHOD.EASE_IN_SINE); - scaleY = TweenManager.CreateTweenThread(popInDuration, 0, scaleAmtY, EASING_METHOD.EASE_IN_SINE); + rot = TweenManager.CreateTweenThread(popInDuration * 0.4f, 0, rotationAmt, EASING_METHOD.LINEAR); + scaleX = TweenManager.CreateTweenThread(popInDuration, 0, scaleAmtX, EASING_METHOD.EASE_OUT_BACK); + scaleY = TweenManager.CreateTweenThread(popInDuration, 0, scaleAmtY, EASING_METHOD.EASE_OUT_BACK); tran = GetComponent(); if (!tran) diff --git a/Assets/Shaders/UI_TRANSISTION_FS.glsl b/Assets/Shaders/UI_TRANSISTION_FS.glsl new file mode 100644 index 00000000..c707fb0d --- /dev/null +++ b/Assets/Shaders/UI_TRANSISTION_FS.glsl @@ -0,0 +1,41 @@ +#version 450 +#extension GL_ARB_separate_shader_objects : enable +#extension GL_ARB_shading_language_420pack : enable +#extension GL_EXT_nonuniform_qualifier : require + +struct MatPropData +{ + int textureIndex; + float alpha; +}; + +layout(location = 0) in struct +{ + vec4 vertPos; // location 0 + vec2 uv; // location = 1 + vec4 normal; // location = 2 + +} In; + +// material stuff +layout(location = 3) flat in struct +{ + int materialIndex; + uint eid; + uint lightLayerIndex; +} In2; + +layout (set = 0, binding = 1) uniform sampler2D textures[]; // for textures (global) +layout (std430, set = 2, binding = 0) buffer MaterialProperties // For materials +{ + MatPropData data[]; +} MatProp; + +layout(location = 0) out vec4 fragColor; +layout(location = 1) out uint outEntityID; + +void main() +{ + fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv); + outEntityID = In2.eid; +} \ No newline at end of file diff --git a/Assets/Shaders/UI_TRANSISTION_FS.shshaderb b/Assets/Shaders/UI_TRANSISTION_FS.shshaderb new file mode 100644 index 00000000..a8ab2167 Binary files /dev/null and b/Assets/Shaders/UI_TRANSISTION_FS.shshaderb differ diff --git a/Assets/Shaders/UI_TRANSISTION_FS.shshaderb.shmeta b/Assets/Shaders/UI_TRANSISTION_FS.shshaderb.shmeta new file mode 100644 index 00000000..0590a750 --- /dev/null +++ b/Assets/Shaders/UI_TRANSISTION_FS.shshaderb.shmeta @@ -0,0 +1,3 @@ +Name: UI_TRANSISTION_FS +ID: 40208610 +Type: 2 diff --git a/Assets/Texture/UI/TX_TransistionBG.dds b/Assets/Texture/UI/TX_TransistionBG.dds new file mode 100644 index 00000000..22b55d17 Binary files /dev/null and b/Assets/Texture/UI/TX_TransistionBG.dds differ diff --git a/Assets/Texture/UI/TX_TransistionBG.shtex b/Assets/Texture/UI/TX_TransistionBG.shtex new file mode 100644 index 00000000..f0c0b10b Binary files /dev/null and b/Assets/Texture/UI/TX_TransistionBG.shtex differ diff --git a/Assets/Texture/UI/TX_TransistionBG.shtex.shmeta b/Assets/Texture/UI/TX_TransistionBG.shtex.shmeta new file mode 100644 index 00000000..6f436e98 --- /dev/null +++ b/Assets/Texture/UI/TX_TransistionBG.shtex.shmeta @@ -0,0 +1,3 @@ +Name: TX_TransistionBG +ID: 50770098 +Type: 3 diff --git a/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.h b/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.h index 1e8d6a3e..02bf7fb6 100644 --- a/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.h +++ b/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.h @@ -47,7 +47,7 @@ namespace SHADE /// /// Maximum number of descriptor sets allowed /// - uint32_t MaxSets = 100; + uint32_t MaxSets = 300; /// /// Flags used to create the DescriptorPool ///