Gameplay UI on Level 2. #390
|
@ -2085,8 +2085,8 @@
|
||||||
Scale: {x: 1, y: 1, z: 1}
|
Scale: {x: 1, y: 1, z: 1}
|
||||||
IsActive: false
|
IsActive: false
|
||||||
Renderable Component:
|
Renderable Component:
|
||||||
Mesh: 0
|
Mesh: 144023586
|
||||||
Material: 0
|
Material: 122370915
|
||||||
IsActive: false
|
IsActive: false
|
||||||
RigidBody Component:
|
RigidBody Component:
|
||||||
Type: Dynamic
|
Type: Dynamic
|
||||||
|
@ -2182,8 +2182,8 @@
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
Components:
|
Components:
|
||||||
Transform Component:
|
Transform Component:
|
||||||
Translate: {x: -0.230162144, y: -0.0580062866, z: -0.00789308548}
|
Translate: {x: 0, y: 0, z: 0}
|
||||||
Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16}
|
Rotate: {x: 0, y: 0, z: 0}
|
||||||
Scale: {x: 1, y: 1, z: 1}
|
Scale: {x: 1, y: 1, z: 1}
|
||||||
IsActive: false
|
IsActive: false
|
||||||
Renderable Component:
|
Renderable Component:
|
||||||
|
@ -2195,8 +2195,8 @@
|
||||||
Drag: 0.00999999978
|
Drag: 0.00999999978
|
||||||
Angular Drag: 0.100000001
|
Angular Drag: 0.100000001
|
||||||
Use Gravity: true
|
Use Gravity: true
|
||||||
Interpolate: false
|
Interpolate: true
|
||||||
Sleeping Enabled: true
|
Sleeping Enabled: false
|
||||||
Freeze Position X: false
|
Freeze Position X: false
|
||||||
Freeze Position Y: false
|
Freeze Position Y: false
|
||||||
Freeze Position Z: false
|
Freeze Position Z: false
|
||||||
|
@ -3477,6 +3477,7 @@
|
||||||
Text: My name is Brandon.
|
Text: My name is Brandon.
|
||||||
Font: 174412429
|
Font: 174412429
|
||||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
Text Size: {x: 1, y: 1, z: 1}
|
||||||
IsActive: true
|
IsActive: true
|
||||||
UI Component:
|
UI Component:
|
||||||
Canvas ID: 199
|
Canvas ID: 199
|
||||||
|
@ -3505,19 +3506,40 @@
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 206
|
- EID: 206
|
||||||
Name: Timer
|
Name: Timer Text
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 1
|
||||||
Components:
|
Components:
|
||||||
Transform Component:
|
Transform Component:
|
||||||
Translate: {x: 500, y: 400, z: 0.100000001}
|
Translate: {x: 700, y: 400, z: 0.100000001}
|
||||||
Rotate: {x: 0, y: 0, z: 0}
|
Rotate: {x: 0, y: 0, z: 0}
|
||||||
Scale: {x: 60, y: 60, z: 60}
|
Scale: {x: 60, y: 60, z: 60}
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Text Renderer Component:
|
Text Renderer Component:
|
||||||
Text: My name is Brandon.
|
Text: My name is Brandon.
|
||||||
Font: 176667660
|
Font: 174412429
|
||||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
Text Size: {x: 1, y: 1, z: 1}
|
||||||
|
IsActive: true
|
||||||
|
UI Component:
|
||||||
|
Canvas ID: 199
|
||||||
|
Hovered: false
|
||||||
|
Clicked: false
|
||||||
|
IsActive: true
|
||||||
|
Scripts: ~
|
||||||
|
- EID: 520
|
||||||
|
Name: Timer BG
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 0
|
||||||
|
Components:
|
||||||
|
Transform Component:
|
||||||
|
Translate: {x: 0.5, y: 0.300000012, z: 0.98999995}
|
||||||
|
Rotate: {x: 0, y: 0, z: 0}
|
||||||
|
Scale: {x: 5, y: 2, z: 1}
|
||||||
|
IsActive: true
|
||||||
|
Renderable Component:
|
||||||
|
Mesh: 141771688
|
||||||
|
Material: 126220632
|
||||||
IsActive: true
|
IsActive: true
|
||||||
UI Component:
|
UI Component:
|
||||||
Canvas ID: 199
|
Canvas ID: 199
|
||||||
|
@ -3539,6 +3561,7 @@
|
||||||
Text: X2
|
Text: X2
|
||||||
Font: 174412429
|
Font: 174412429
|
||||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
Text Size: {x: 1, y: 1, z: 1}
|
||||||
IsActive: true
|
IsActive: true
|
||||||
UI Component:
|
UI Component:
|
||||||
Canvas ID: 199
|
Canvas ID: 199
|
||||||
|
@ -3551,7 +3574,7 @@
|
||||||
maxSize: 1
|
maxSize: 1
|
||||||
minSize: 0.300000012
|
minSize: 0.300000012
|
||||||
minAlpha: 0.300000012
|
minAlpha: 0.300000012
|
||||||
- EID: 520
|
- EID: 519
|
||||||
Name: Multiplier BG
|
Name: Multiplier BG
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -5725,7 +5748,7 @@
|
||||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||||
IsActive: false
|
IsActive: false
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 519
|
- EID: 461
|
||||||
Name: Piece2
|
Name: Piece2
|
||||||
IsActive: false
|
IsActive: false
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -5766,7 +5789,7 @@
|
||||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||||
IsActive: false
|
IsActive: false
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 461
|
- EID: 460
|
||||||
Name: Piece3
|
Name: Piece3
|
||||||
IsActive: false
|
IsActive: false
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -5807,7 +5830,7 @@
|
||||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||||
IsActive: false
|
IsActive: false
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 460
|
- EID: 459
|
||||||
Name: Piece4
|
Name: Piece4
|
||||||
IsActive: false
|
IsActive: false
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -6061,14 +6084,14 @@
|
||||||
Enabled: true
|
Enabled: true
|
||||||
- EID: 10
|
- EID: 10
|
||||||
Name: Pause Canvas
|
Name: Pause Canvas
|
||||||
IsActive: true
|
IsActive: false
|
||||||
NumberOfChildren: 4
|
NumberOfChildren: 4
|
||||||
Components:
|
Components:
|
||||||
Canvas Component:
|
Canvas Component:
|
||||||
Canvas Width: 1920
|
Canvas Width: 1920
|
||||||
Canvas Height: 1080
|
Canvas Height: 1080
|
||||||
Scale by canvas width: false
|
Scale by canvas width: false
|
||||||
IsActive: true
|
IsActive: false
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 8
|
- EID: 8
|
||||||
Name: ResumeButton
|
Name: ResumeButton
|
||||||
|
@ -6136,7 +6159,7 @@
|
||||||
onReleaseSound: event:/Music/player_undetected
|
onReleaseSound: event:/Music/player_undetected
|
||||||
hoverScale: 1.10000002
|
hoverScale: 1.10000002
|
||||||
clickScale: 0.899999976
|
clickScale: 0.899999976
|
||||||
- EID: 459
|
- EID: 458
|
||||||
Name: RetryButton
|
Name: RetryButton
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -6183,6 +6206,7 @@
|
||||||
Text: Game Pause
|
Text: Game Pause
|
||||||
Font: 176667660
|
Font: 176667660
|
||||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
Text Size: {x: 1, y: 1, z: 1}
|
||||||
IsActive: false
|
IsActive: false
|
||||||
UI Component:
|
UI Component:
|
||||||
Canvas ID: 10
|
Canvas ID: 10
|
||||||
|
@ -11912,7 +11936,7 @@
|
||||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 458
|
- EID: 457
|
||||||
Name: Exterior
|
Name: Exterior
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 5
|
NumberOfChildren: 5
|
||||||
|
@ -14576,7 +14600,7 @@
|
||||||
Material: 131956078
|
Material: 131956078
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 457
|
- EID: 174
|
||||||
Name: Exterior_Bush02
|
Name: Exterior_Bush02
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -14591,7 +14615,7 @@
|
||||||
Material: 131956078
|
Material: 131956078
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 174
|
- EID: 173
|
||||||
Name: Exterior_Bush01
|
Name: Exterior_Bush01
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -14606,7 +14630,7 @@
|
||||||
Material: 131956078
|
Material: 131956078
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 173
|
- EID: 172
|
||||||
Name: Exterior_Bush02
|
Name: Exterior_Bush02
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -14621,7 +14645,7 @@
|
||||||
Material: 131956078
|
Material: 131956078
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 172
|
- EID: 548
|
||||||
Name: TweenManager
|
Name: TweenManager
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -14629,7 +14653,7 @@
|
||||||
Scripts:
|
Scripts:
|
||||||
- Type: SHADE_Scripting.UI.TweenManager
|
- Type: SHADE_Scripting.UI.TweenManager
|
||||||
Enabled: true
|
Enabled: true
|
||||||
- EID: 548
|
- EID: 549
|
||||||
Name: StealFoodCanvas
|
Name: StealFoodCanvas
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 1
|
NumberOfChildren: 1
|
||||||
|
@ -14640,7 +14664,7 @@
|
||||||
Scale by canvas width: false
|
Scale by canvas width: false
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 549
|
- EID: 550
|
||||||
Name: StealFoodLogo
|
Name: StealFoodLogo
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -14655,7 +14679,7 @@
|
||||||
Material: 127459277
|
Material: 127459277
|
||||||
IsActive: true
|
IsActive: true
|
||||||
UI Component:
|
UI Component:
|
||||||
Canvas ID: 548
|
Canvas ID: 549
|
||||||
Hovered: false
|
Hovered: false
|
||||||
Clicked: false
|
Clicked: false
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -14668,7 +14692,7 @@
|
||||||
rotationAmt: 1800
|
rotationAmt: 1800
|
||||||
scaleAmtX: 538
|
scaleAmtX: 538
|
||||||
scaleAmtY: 377
|
scaleAmtY: 377
|
||||||
- EID: 550
|
- EID: 551
|
||||||
Name: TransitionCanvas
|
Name: TransitionCanvas
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 1
|
NumberOfChildren: 1
|
||||||
|
@ -14679,7 +14703,7 @@
|
||||||
Scale by canvas width: false
|
Scale by canvas width: false
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 551
|
- EID: 552
|
||||||
Name: Transition
|
Name: Transition
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -14694,7 +14718,7 @@
|
||||||
Material: 120016136
|
Material: 120016136
|
||||||
IsActive: true
|
IsActive: true
|
||||||
UI Component:
|
UI Component:
|
||||||
Canvas ID: 550
|
Canvas ID: 551
|
||||||
Hovered: false
|
Hovered: false
|
||||||
Clicked: false
|
Clicked: false
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -14704,7 +14728,7 @@
|
||||||
alphaValue: 1
|
alphaValue: 1
|
||||||
fadeInTime: 0.5
|
fadeInTime: 0.5
|
||||||
fadeOutTime: 0.5
|
fadeOutTime: 0.5
|
||||||
- EID: 552
|
- EID: 553
|
||||||
Name: TweenManager
|
Name: TweenManager
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -14712,7 +14736,7 @@
|
||||||
Scripts:
|
Scripts:
|
||||||
- Type: SHADE_Scripting.UI.TweenManager
|
- Type: SHADE_Scripting.UI.TweenManager
|
||||||
Enabled: true
|
Enabled: true
|
||||||
- EID: 553
|
- EID: 554
|
||||||
Name: CameraPoints
|
Name: CameraPoints
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 3
|
NumberOfChildren: 3
|
||||||
|
@ -14725,7 +14749,7 @@
|
||||||
endPoint3: [1.14999998, 2.20000005, 2]
|
endPoint3: [1.14999998, 2.20000005, 2]
|
||||||
playerCamera: 4
|
playerCamera: 4
|
||||||
duration: 3
|
duration: 3
|
||||||
- EID: 554
|
- EID: 555
|
||||||
Name: PreviewLevel1
|
Name: PreviewLevel1
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -14747,7 +14771,7 @@
|
||||||
FOV: 90
|
FOV: 90
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 555
|
- EID: 556
|
||||||
Name: PreviewLevel2
|
Name: PreviewLevel2
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
@ -14769,7 +14793,7 @@
|
||||||
FOV: 90
|
FOV: 90
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 556
|
- EID: 557
|
||||||
Name: PreviewLevel3
|
Name: PreviewLevel3
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
|
|
|
@ -1100,7 +1100,11 @@
|
||||||
Hovered: false
|
Hovered: false
|
||||||
Clicked: false
|
Clicked: false
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts:
|
||||||
|
- Type: SHADE_Scripting.UI.ScrollingCredits
|
||||||
|
Enabled: true
|
||||||
|
endY: 4000
|
||||||
|
duration: 20
|
||||||
- EID: 48
|
- EID: 48
|
||||||
Name: BackButton
|
Name: BackButton
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -1131,23 +1135,23 @@
|
||||||
canvasToActivate: 0
|
canvasToActivate: 0
|
||||||
- EID: 49
|
- EID: 49
|
||||||
Name: Credits Title Text
|
Name: Credits Title Text
|
||||||
IsActive: true
|
IsActive: false
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
Components:
|
Components:
|
||||||
Transform Component:
|
Transform Component:
|
||||||
Translate: {x: -150, y: 400, z: 0.100000001}
|
Translate: {x: -150, y: 400, z: 0.100000001}
|
||||||
Rotate: {x: 0, y: 0, z: 0}
|
Rotate: {x: 0, y: 0, z: 0}
|
||||||
Scale: {x: 100, y: 100, z: 1}
|
Scale: {x: 100, y: 100, z: 1}
|
||||||
IsActive: true
|
IsActive: false
|
||||||
Text Renderer Component:
|
Text Renderer Component:
|
||||||
Text: Credits
|
Text: Credits
|
||||||
Font: 174412429
|
Font: 174412429
|
||||||
IsActive: true
|
IsActive: false
|
||||||
UI Component:
|
UI Component:
|
||||||
Canvas ID: 46
|
Canvas ID: 46
|
||||||
Hovered: false
|
Hovered: false
|
||||||
Clicked: false
|
Clicked: false
|
||||||
IsActive: true
|
IsActive: false
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 50
|
- EID: 50
|
||||||
Name: Level Select Canvas
|
Name: Level Select Canvas
|
||||||
|
|
|
@ -76,9 +76,9 @@ public class GameManager : Script
|
||||||
goingToLose = false;
|
goingToLose = false;
|
||||||
|
|
||||||
if (scoreText)
|
if (scoreText)
|
||||||
scoreText.GetComponent<TextRenderable>().Text = $"Score: {Score}";
|
scoreText.GetComponent<TextRenderable>().Text = $"{Score}";
|
||||||
if (timeText)
|
if (timeText)
|
||||||
timeText.GetComponent<TextRenderable>().Text = $"Time Left: {timer.ToString("0")}";
|
timeText.GetComponent<TextRenderable>().Text = $"{timer.ToString("0")}";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void start()
|
protected override void start()
|
||||||
|
@ -105,7 +105,7 @@ public class GameManager : Script
|
||||||
if (GamePause || !stealFoodPopUpDone)
|
if (GamePause || !stealFoodPopUpDone)
|
||||||
{
|
{
|
||||||
Input.SetMouseCentering(false);
|
Input.SetMouseCentering(false);
|
||||||
//Application.IsCursorVisible = true;
|
Application.IsCursorVisible = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,12 +117,10 @@ public class GameManager : Script
|
||||||
if(scoreText)
|
if(scoreText)
|
||||||
scoreText.GetComponent<TextRenderable>().Text = $"{Score}";
|
scoreText.GetComponent<TextRenderable>().Text = $"{Score}";
|
||||||
if(timeText)
|
if(timeText)
|
||||||
timeText.GetComponent<TextRenderable>().Text = $"Time Left: {timer.ToString("0")}";
|
timeText.GetComponent<TextRenderable>().Text = $"{timer.ToString("0.00")}";
|
||||||
|
|
||||||
if (itemScored)
|
if (itemScored)
|
||||||
{
|
{
|
||||||
//multiplierText.GetComponent<TextRenderable>().Text = $"X {currMultiplierCombo}";
|
|
||||||
//multiplierText.GetComponent<Transform>().LocalScale -= fontScalar * Time.DeltaTimeF;
|
|
||||||
currMultiplierDuration += Time.DeltaTimeF;
|
currMultiplierDuration += Time.DeltaTimeF;
|
||||||
|
|
||||||
if (currMultiplierDuration >= maxMultiplierDuration)
|
if (currMultiplierDuration >= maxMultiplierDuration)
|
||||||
|
@ -197,7 +195,6 @@ public class GameManager : Script
|
||||||
totalItemCount -= 1;
|
totalItemCount -= 1;
|
||||||
itemScored = true;
|
itemScored = true;
|
||||||
currMultiplierDuration = 0;
|
currMultiplierDuration = 0;
|
||||||
//multiplierText.GetComponent<Transform>().LocalScale = new Vector3(multiplierFont, multiplierFont, multiplierFont);
|
|
||||||
|
|
||||||
if (currMultiplierCombo < maxMultiplierCombo)
|
if (currMultiplierCombo < maxMultiplierCombo)
|
||||||
currMultiplierCombo += 1;
|
currMultiplierCombo += 1;
|
||||||
|
|
|
@ -52,12 +52,15 @@ namespace SHADE_Scripting.UI
|
||||||
|
|
||||||
private static float EaseInSine(float value)
|
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)
|
private static float EaseOutSine(float value)
|
||||||
{
|
{
|
||||||
return (float)(Math.Sin(value * Math.PI / 2.0f) );
|
return (float)(Math.Sin(value * Math.PI / 2.0f) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ public class EndScene : Script
|
||||||
|
|
||||||
protected override void start()
|
protected override void start()
|
||||||
{
|
{
|
||||||
Input.SetMouseCentering(false);
|
|
||||||
Debug.Log("EndScene::Start():");
|
Debug.Log("EndScene::Start():");
|
||||||
Application.IsCursorVisible = true;
|
//Input.SetMouseCentering(false);
|
||||||
|
//Application.IsCursorVisible = true;
|
||||||
SceneFadeInOut.Instance.CallFadeOut();
|
SceneFadeInOut.Instance.CallFadeOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ public class MainMenu : Script
|
||||||
|
|
||||||
protected override void start()
|
protected override void start()
|
||||||
{
|
{
|
||||||
Input.SetMouseCentering(false);
|
//Input.SetMouseCentering(false);
|
||||||
Application.IsCursorVisible = true;
|
//Application.IsCursorVisible = true;
|
||||||
SceneFadeInOut.Instance.CallFadeOut();
|
SceneFadeInOut.Instance.CallFadeOut();
|
||||||
}
|
}
|
||||||
protected override void update()
|
protected override void update()
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace SHADE_Scripting.UI
|
||||||
{
|
{
|
||||||
[NonSerialized]
|
[NonSerialized]
|
||||||
private TweenThread sizeThread;
|
private TweenThread sizeThread;
|
||||||
|
private TweenThread sizeInvertThread;
|
||||||
private TweenThread alphaThread;
|
private TweenThread alphaThread;
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +21,7 @@ namespace SHADE_Scripting.UI
|
||||||
|
|
||||||
|
|
||||||
private bool showMultiplier = false;
|
private bool showMultiplier = false;
|
||||||
|
const float sizeUpDuration = 0.1f;
|
||||||
|
|
||||||
[NonSerialized]
|
[NonSerialized]
|
||||||
private Vector3 defaultScale;
|
private Vector3 defaultScale;
|
||||||
|
@ -27,6 +29,7 @@ namespace SHADE_Scripting.UI
|
||||||
protected override void start()
|
protected override void start()
|
||||||
{
|
{
|
||||||
sizeThread = TweenManager.CreateTweenThread(0.0f, maxSize, minSize, EASING_METHOD.EASE_IN_SINE);
|
sizeThread = TweenManager.CreateTweenThread(0.0f, maxSize, minSize, EASING_METHOD.EASE_IN_SINE);
|
||||||
|
sizeInvertThread = TweenManager.CreateTweenThread(sizeUpDuration, minSize, maxSize, EASING_METHOD.EASE_IN_SINE);
|
||||||
alphaThread = TweenManager.CreateTweenThread(0.0f, 1.0f, minAlpha, EASING_METHOD.EASE_OUT_SINE);
|
alphaThread = TweenManager.CreateTweenThread(0.0f, 1.0f, minAlpha, EASING_METHOD.EASE_OUT_SINE);
|
||||||
Transform transform = GetComponent<Transform>();
|
Transform transform = GetComponent<Transform>();
|
||||||
if (transform != null)
|
if (transform != null)
|
||||||
|
@ -43,8 +46,29 @@ namespace SHADE_Scripting.UI
|
||||||
protected override void update()
|
protected override void update()
|
||||||
{
|
{
|
||||||
Transform transform = GetComponent<Transform>();
|
Transform transform = GetComponent<Transform>();
|
||||||
|
|
||||||
|
|
||||||
if (transform != null && showMultiplier == true)
|
if (transform != null && showMultiplier == true)
|
||||||
{
|
{
|
||||||
|
if(!sizeInvertThread.IsCompleted())
|
||||||
|
{
|
||||||
|
transform.LocalScale = defaultScale * sizeInvertThread.GetValue();
|
||||||
|
|
||||||
|
Renderable rend = GetComponentInChildren<Renderable>();
|
||||||
|
if(rend)
|
||||||
|
{
|
||||||
|
rend.Material.SetProperty<float>("data.alpha", 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
TextRenderable text = GetComponent<TextRenderable>();
|
||||||
|
if (text)
|
||||||
|
{
|
||||||
|
Color clr = text.TextColor;
|
||||||
|
text.TextColor = new Color(clr.r, clr.g, clr.b, 1.0f);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(sizeThread.IsCompleted())
|
if(sizeThread.IsCompleted())
|
||||||
{
|
{
|
||||||
transform.LocalScale = Vector3.Zero;
|
transform.LocalScale = Vector3.Zero;
|
||||||
|
@ -53,7 +77,18 @@ namespace SHADE_Scripting.UI
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
transform.LocalScale = defaultScale * sizeThread.GetValue();
|
transform.LocalScale = defaultScale * sizeThread.GetValue();
|
||||||
GetComponentInChildren<Renderable>().Material.SetProperty<float>("data.alpha",alphaThread.GetValue());
|
|
||||||
|
Renderable rend = GetComponentInChildren<Renderable>();
|
||||||
|
if (rend)
|
||||||
|
{
|
||||||
|
rend.Material.SetProperty<float>("data.alpha", alphaThread.GetValue());
|
||||||
|
}
|
||||||
|
TextRenderable text = GetComponent<TextRenderable>();
|
||||||
|
if(text)
|
||||||
|
{
|
||||||
|
Color clr = text.TextColor;
|
||||||
|
text.TextColor = new Color(clr.r,clr.g,clr.b,alphaThread.GetValue() * 1.3f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,9 +97,10 @@ namespace SHADE_Scripting.UI
|
||||||
public void ShowMultiplier(int multiplier, float duration)
|
public void ShowMultiplier(int multiplier, float duration)
|
||||||
{
|
{
|
||||||
GetComponent<TextRenderable>().Text = $"X {multiplier}";
|
GetComponent<TextRenderable>().Text = $"X {multiplier}";
|
||||||
sizeThread.duration = duration;
|
sizeThread.duration = duration + sizeUpDuration;
|
||||||
alphaThread.duration = duration;
|
alphaThread.duration = duration + sizeUpDuration;
|
||||||
|
|
||||||
|
sizeInvertThread.Reset();
|
||||||
sizeThread.Reset();
|
sizeThread.Reset();
|
||||||
alphaThread.Reset();
|
alphaThread.Reset();
|
||||||
showMultiplier = true;
|
showMultiplier = true;
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
using System;
|
||||||
|
using SHADE;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SHADE_Scripting.UI
|
||||||
|
{
|
||||||
|
public class ScrollingCredits: Script
|
||||||
|
{
|
||||||
|
|
||||||
|
public float endY = 4000.0f;
|
||||||
|
public float duration = 30.0f;
|
||||||
|
|
||||||
|
|
||||||
|
[NonSerialized]
|
||||||
|
TweenThread thread;
|
||||||
|
|
||||||
|
protected override void awake()
|
||||||
|
{
|
||||||
|
base.awake();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void start()
|
||||||
|
{
|
||||||
|
base.start();
|
||||||
|
|
||||||
|
Transform transform = GetComponent<Transform>();
|
||||||
|
if(transform != null)
|
||||||
|
{
|
||||||
|
thread = TweenManager.CreateTweenThread(duration, transform.LocalPosition.y, endY, EASING_METHOD.EASE_IN_SINE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void update()
|
||||||
|
{
|
||||||
|
base.update();
|
||||||
|
|
||||||
|
Transform transform = GetComponent<Transform>();
|
||||||
|
|
||||||
|
if(thread != null && transform != null)
|
||||||
|
{
|
||||||
|
transform.LocalPosition = new Vector3( transform.LocalPosition.x ,thread.GetValue() , transform.LocalPosition.z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: SC_ScrollingCredits
|
||||||
|
ID: 159139676
|
||||||
|
Type: 9
|
|
@ -19,6 +19,7 @@ of DigiPen Institute of Technology is prohibited.
|
||||||
#include "Assets/NativeAsset.hxx"
|
#include "Assets/NativeAsset.hxx"
|
||||||
#include "Utility/Convert.hxx"
|
#include "Utility/Convert.hxx"
|
||||||
|
|
||||||
|
|
||||||
namespace SHADE
|
namespace SHADE
|
||||||
{
|
{
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
@ -55,4 +56,16 @@ namespace SHADE
|
||||||
GetNativeComponent()->SetFont(value.NativeObject);
|
GetNativeComponent()->SetFont(value.NativeObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Color TextRenderable::TextColor::get()
|
||||||
|
{
|
||||||
|
return Convert::ToCLI(GetNativeComponent()->GetColor());
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextRenderable::TextColor::set(Color value)
|
||||||
|
{
|
||||||
|
GetNativeComponent()->SetColor(Convert::ToNative(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,13 @@ namespace SHADE
|
||||||
FontAsset get();
|
FontAsset get();
|
||||||
void set(FontAsset value);
|
void set(FontAsset value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property Color TextColor
|
||||||
|
{
|
||||||
|
Color get();
|
||||||
|
void set(Color value);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ namespace SHADE
|
||||||
: Component(entity)
|
: Component(entity)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
/* Properties */
|
/* Properties */
|
||||||
/*-----------------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace SHADE
|
||||||
}
|
}
|
||||||
void Application::IsCursorVisible::set(bool value)
|
void Application::IsCursorVisible::set(bool value)
|
||||||
{
|
{
|
||||||
SHWindow::SetMouseVisible(value);
|
//SHWindow::SetMouseVisible(value);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* Usage Functions */
|
/* Usage Functions */
|
||||||
|
|
|
@ -149,7 +149,7 @@ namespace SHADE
|
||||||
|
|
||||||
void Input::SetMouseCentering(bool state)
|
void Input::SetMouseCentering(bool state)
|
||||||
{
|
{
|
||||||
SHInputManager::SetMouseCentering(state);
|
//SHInputManager::SetMouseCentering(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Input::GetMouseCentering()
|
bool Input::GetMouseCentering()
|
||||||
|
|
Loading…
Reference in New Issue