Gameplay UI on Level 2. #390
|
@ -2279,18 +2279,38 @@
|
||||||
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}
|
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
|
||||||
|
IsActive: true
|
||||||
|
UI Component:
|
||||||
|
Canvas ID: 199
|
||||||
|
Hovered: false
|
||||||
|
Clicked: false
|
||||||
|
IsActive: true
|
||||||
|
Scripts: ~
|
||||||
|
- EID: 526
|
||||||
|
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
|
||||||
|
@ -4882,7 +4902,7 @@
|
||||||
Components:
|
Components:
|
||||||
Transform Component:
|
Transform Component:
|
||||||
Translate: {x: 0, y: -300, z: 0}
|
Translate: {x: 0, y: -300, z: 0}
|
||||||
Rotate: {x: 0, y: 0, z: 0}
|
Rotate: {x: 724.5, y: 424.5, z: 59.9999962}
|
||||||
Scale: {x: 400, y: 100, z: 500}
|
Scale: {x: 400, y: 100, z: 500}
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Renderable Component:
|
Renderable Component:
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -106,12 +106,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.00")}";
|
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)
|
||||||
|
@ -170,7 +168,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;
|
||||||
|
@ -178,9 +175,9 @@ public class GameManager : Script
|
||||||
MultiplierTextFx fx = multiplierText.GetScript<MultiplierTextFx>();
|
MultiplierTextFx fx = multiplierText.GetScript<MultiplierTextFx>();
|
||||||
if (fx)
|
if (fx)
|
||||||
{
|
{
|
||||||
fx.ShowMultiplier(currMultiplierCombo, maxMultiplierDuration);
|
fx.ShowMultiplier(currMultiplierCombo, maxMultiplierDuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue