Scene changes #451

Merged
glencelow merged 3 commits from PlayerController into main 2023-04-01 16:11:08 +08:00
21 changed files with 512 additions and 103 deletions

View File

@ -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}

View File

@ -0,0 +1,3 @@
Name: UIMat_Transistion
ID: 132131066
Type: 7

View File

@ -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
@ -9669,3 +9670,64 @@
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: ~

View File

@ -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
@ -17635,3 +17636,64 @@
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: ~

View File

@ -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}
@ -15973,3 +15974,64 @@
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: ~

View File

@ -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
@ -1674,3 +1678,64 @@
alphaValue: 0
fadeInTime: 0.5
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: ~

View File

@ -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;
}
}

View File

@ -9,6 +9,7 @@ namespace SHADE_Scripting.UI
public class PreviewLevel : Script
{
private List<Camera> 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<LevelTransistion>().complete && !point1Done)
{
moveToEndPoint1.Reset();
return;

View File

@ -4,15 +4,17 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
public enum EASING_METHOD
{
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
{
@ -50,6 +52,14 @@ public static class EasingHelper
{
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);
}
}

View File

@ -7,7 +7,8 @@ public class ChangeSceneButton : Script
{
public uint sceneID = 0;
//Whether the scene changing button has been clicked
public GameObject levelTransistion;
private bool clickedFlag;
protected override void awake()
@ -26,9 +27,8 @@ public class ChangeSceneButton : Script
{
Audio.PlaySFXOnce2D("event:/UI/success");
Audio.StopAllSounds();
if (SceneFadeInOut.Instance != null)
SceneFadeInOut.Instance.CallFadeIn();
clickedFlag = true;
levelTransistion.SetActive(true);
}
});
}
@ -39,7 +39,7 @@ public class ChangeSceneButton : Script
}
protected override void update()
{
if (clickedFlag && sceneID != 0 && SceneFadeInOut.Instance.FadeInFinished())
if (levelTransistion.GetScript<LevelTransistion>().complete && clickedFlag)
{
SceneManager.ChangeScene(sceneID);
}

View File

@ -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<Transform>();
if (!logoTran)
Debug.LogError("MISSING LOGO TRAN");
bgTran = bg.GetComponent<Transform>();
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;
}
}

View File

@ -0,0 +1,3 @@
Name: SC_LevelTransistion
ID: 158044875
Type: 9

View File

@ -26,6 +26,7 @@ public class MainMenu : Script
{
Input.SetMouseCentering(false);
Application.IsCursorVisible = true;
if(SceneFadeInOut.Instance)
SceneFadeInOut.Instance.CallFadeOut();
}
protected override void update()

View File

@ -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<Transform>();
if (!tran)

View File

@ -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;
}

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: UI_TRANSISTION_FS
ID: 40208610
Type: 2

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_TransistionBG
ID: 50770098
Type: 3

View File

@ -47,7 +47,7 @@ namespace SHADE
/// <summary>
/// Maximum number of descriptor sets allowed
/// </summary>
uint32_t MaxSets = 100;
uint32_t MaxSets = 300;
/// <summary>
/// Flags used to create the DescriptorPool
/// </summary>