Level changes and bug fix #453

Merged
glencelow merged 3 commits from PlayerController into main 2023-04-01 16:43:19 +08:00
8 changed files with 82 additions and 62 deletions
Showing only changes of commit ce6288880a - Show all commits

View File

@ -9485,7 +9485,7 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0.400000006, y: 0.400000006, z: 0.699999988} Translate: {x: 0.800000012, y: 0.400000006, z: 0.699999988}
Rotate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 4.26499987, y: 2, z: 1} Scale: {x: 4.26499987, y: 2, z: 1}
IsActive: true IsActive: true
@ -9520,7 +9520,12 @@
Hovered: false Hovered: false
Clicked: false Clicked: false
IsActive: true IsActive: true
Scripts: ~ Scripts:
- Type: SHADE_Scripting.UI.SingleScaleBounce
Enabled: true
durationUp: 0.150000006
durationDown: 0.300000012
scaleSize: 1.20000005
- EID: 626 - EID: 626
Name: Result Canvas Name: Result Canvas
IsActive: false IsActive: false

View File

@ -17082,7 +17082,7 @@
Scripts: Scripts:
- Type: SHADE_Scripting.UI.PreviewLevel - Type: SHADE_Scripting.UI.PreviewLevel
Enabled: true Enabled: true
levelTransistion: 609 levelTransistion: 608
endPoint1: [-3.5, 1.5, -4.5] endPoint1: [-3.5, 1.5, -4.5]
endPoint2: [0, 2, 4.5] endPoint2: [0, 2, 4.5]
endPoint3: [1.14999998, 2.20000005, 2] endPoint3: [1.14999998, 2.20000005, 2]
@ -17305,7 +17305,7 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0.400000006, y: 0.400000006, z: 0.699999988} Translate: {x: 0.800000012, y: 0.400000006, z: 0.699999988}
Rotate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 4.26499987, y: 2, z: 1} Scale: {x: 4.26499987, y: 2, z: 1}
IsActive: true IsActive: true
@ -17487,8 +17487,8 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0, y: 0, z: -0.329473495} Translate: {x: 0, y: 0, z: 0}
Rotate: {x: -0, y: 0, z: -0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
@ -17653,7 +17653,7 @@
Clicked: false Clicked: false
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 609 - EID: 608
Name: LevelTransistionCanvas Name: LevelTransistionCanvas
IsActive: true IsActive: true
NumberOfChildren: 2 NumberOfChildren: 2
@ -17666,15 +17666,15 @@
Scripts: Scripts:
- Type: LevelTransistion - Type: LevelTransistion
Enabled: true Enabled: true
logo: 608 logo: 607
bg: 607 bg: 606
duration: 0.5 duration: 0.5
bgEndPositionX: 3000 bgEndPositionX: 3000
logoEndPositionX: 3000 logoEndPositionX: 3000
rotAndScale: false rotAndScale: false
rotationAmt: 360 rotationAmt: 360
scaleAmt: 631 scaleAmt: 631
- EID: 608 - EID: 607
Name: LevelTransistionLogo Name: LevelTransistionLogo
IsActive: true IsActive: true
NumberOfChildren: 0 NumberOfChildren: 0
@ -17689,12 +17689,12 @@
Material: 126117259 Material: 126117259
IsActive: true IsActive: true
UI Component: UI Component:
Canvas ID: 609 Canvas ID: 608
Hovered: false Hovered: false
Clicked: false Clicked: false
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 607 - EID: 606
Name: LevelTransistionBG Name: LevelTransistionBG
IsActive: true IsActive: true
NumberOfChildren: 0 NumberOfChildren: 0
@ -17709,7 +17709,7 @@
Material: 132131066 Material: 132131066
IsActive: true IsActive: true
UI Component: UI Component:
Canvas ID: 609 Canvas ID: 608
Hovered: false Hovered: false
Clicked: false Clicked: false
IsActive: true IsActive: true

View File

@ -9380,7 +9380,7 @@
Scripts: Scripts:
- Type: SHADE_Scripting.UI.PreviewLevel - Type: SHADE_Scripting.UI.PreviewLevel
Enabled: true Enabled: true
levelTransistion: 230 levelTransistion: 229
endPoint1: [-1.79999995, 1.5, 0.5] endPoint1: [-1.79999995, 1.5, 0.5]
endPoint2: [5, 3.5, 0.5] endPoint2: [5, 3.5, 0.5]
endPoint3: [-0.5, 1.5, 3.5] endPoint3: [-0.5, 1.5, 3.5]
@ -15634,8 +15634,8 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0, y: 0, z: -0.329473495} Translate: {x: 0, y: 0, z: 0}
Rotate: {x: -0, y: 0, z: -0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
@ -15789,7 +15789,7 @@
NumberOfChildren: 0 NumberOfChildren: 0
Components: Components:
Transform Component: Transform Component:
Translate: {x: 0.400000006, y: 0.400000006, z: 0.98999995} Translate: {x: 0.800000012, y: 0.400000006, z: 0.98999995}
Rotate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 4.26499987, y: 2, z: 1} Scale: {x: 4.26499987, y: 2, z: 1}
IsActive: true IsActive: true
@ -15824,7 +15824,12 @@
Hovered: false Hovered: false
Clicked: false Clicked: false
IsActive: true IsActive: true
Scripts: ~ Scripts:
- Type: SHADE_Scripting.UI.SingleScaleBounce
Enabled: true
durationUp: 0.150000006
durationDown: 0.300000012
scaleSize: 1.20000005
- EID: 505 - EID: 505
Name: Result Canvas Name: Result Canvas
IsActive: false IsActive: false
@ -15986,7 +15991,7 @@
Clicked: false Clicked: false
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 230 - EID: 229
Name: LevelTransistionCanvas Name: LevelTransistionCanvas
IsActive: true IsActive: true
NumberOfChildren: 2 NumberOfChildren: 2
@ -15999,15 +16004,15 @@
Scripts: Scripts:
- Type: LevelTransistion - Type: LevelTransistion
Enabled: true Enabled: true
logo: 229 logo: 228
bg: 228 bg: 227
duration: 0.5 duration: 0.5
bgEndPositionX: 3000 bgEndPositionX: 3000
logoEndPositionX: 3000 logoEndPositionX: 3000
rotAndScale: false rotAndScale: false
rotationAmt: 360 rotationAmt: 360
scaleAmt: 631 scaleAmt: 631
- EID: 229 - EID: 228
Name: LevelTransistionLogo Name: LevelTransistionLogo
IsActive: true IsActive: true
NumberOfChildren: 0 NumberOfChildren: 0
@ -16022,12 +16027,12 @@
Material: 126117259 Material: 126117259
IsActive: true IsActive: true
UI Component: UI Component:
Canvas ID: 230 Canvas ID: 229
Hovered: false Hovered: false
Clicked: false Clicked: false
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 228 - EID: 227
Name: LevelTransistionBG Name: LevelTransistionBG
IsActive: true IsActive: true
NumberOfChildren: 0 NumberOfChildren: 0
@ -16042,7 +16047,7 @@
Material: 132131066 Material: 132131066
IsActive: true IsActive: true
UI Component: UI Component:
Canvas ID: 230 Canvas ID: 229
Hovered: false Hovered: false
Clicked: false Clicked: false
IsActive: true IsActive: true

View File

@ -237,9 +237,9 @@ public class GameManager : Script
/*
//if (textBounce) if (textBounce)
// textBounce.ScaleBounceOnce(); textBounce.ScaleBounceOnce();*/
if (textBGBounce) if (textBGBounce)
textBGBounce.ScaleBounceOnce(); textBGBounce.ScaleBounceOnce();

View File

@ -54,7 +54,7 @@ namespace SHADE_Scripting.UI
protected override void start() protected override void start()
{ {
thread = TweenManager.CreateTweenThread(0.1f, 0.9f, 1.0f, EASING_METHOD.EASE_IN_SINE); thread = TweenManager.CreateTweenThread(0.1f, 0.9f, 1.0f, EASING_METHOD.EASE_OUT_BACK);
Transform transform = GetComponent<Transform>(); Transform transform = GetComponent<Transform>();

View File

@ -3,6 +3,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace SHADE_Scripting.UI namespace SHADE_Scripting.UI
@ -40,8 +41,13 @@ namespace SHADE_Scripting.UI
protected override void update() protected override void update()
{ {
if (sizeThread == null || sizeInvertThread == null)
return;
Transform transform = GetComponent<Transform>(); Transform transform = GetComponent<Transform>();
GetComponent<TextRenderable>().Text = $"X {GameManager.Instance.currMultiplierCombo}";
if (transform != null) if (transform != null)
{ {
@ -66,7 +72,6 @@ namespace SHADE_Scripting.UI
public void ShowMultiplier(int multiplier, float duration) public void ShowMultiplier(int multiplier, float duration)
{ {
GetComponent<TextRenderable>().Text = $"X {multiplier}";
sizeThread.duration = duration + sizeUpDuration; sizeThread.duration = duration + sizeUpDuration;
sizeInvertThread.Reset(); sizeInvertThread.Reset();

View File

@ -23,36 +23,39 @@ namespace SHADE_Scripting.UI
private bool lastActive = false; private bool lastActive = false;
protected override void start() protected override void start()
{ {
thread = TweenManager.CreateTweenThread(duration, minScale, maxScale, EASING_METHOD.EASE_IN_SINE); thread = TweenManager.CreateTweenThread(duration, minScale, maxScale, EASING_METHOD.EASE_IN_SINE);
Transform trans = GetComponent<Transform>(); Transform trans = GetComponent<Transform>();
if(trans != null) if (trans != null)
{ {
defaultScale = trans.LocalScale; defaultScale = trans.LocalScale;
} }
}
protected override void update()
{
if(isActive != lastActive && isActive == true)
{
thread.Reset();
}
lastActive = isActive;
Transform trans = GetComponent<Transform>();
if(trans != null && isActive)
{
trans.LocalScale = defaultScale * thread.GetValue();
}
if(thread.IsCompleted())
{
thread.ResetInvert();
}
}
} }
protected override void update()
{
if (thread == null)
return;
if (isActive != lastActive && isActive == true)
{
thread.Reset();
}
lastActive = isActive;
Transform trans = GetComponent<Transform>();
if (trans != null && isActive)
{
trans.LocalScale = defaultScale * thread.GetValue();
}
if (thread.IsCompleted())
{
thread.ResetInvert();
}
}
}
} }

View File

@ -38,7 +38,7 @@ namespace SHADE_Scripting.UI
protected override void start() protected override void start()
{ {
thread = TweenManager.CreateTweenThread(0.0f, 1.0f, 1.0f, EASING_METHOD.EASE_IN_SINE); thread = TweenManager.CreateTweenThread(0.0f, 1.0f, 1.0f, EASING_METHOD.LINEAR);
} }
@ -50,6 +50,7 @@ namespace SHADE_Scripting.UI
{ {
scaleUp = false; scaleUp = false;
thread.duration = durationDown; thread.duration = durationDown;
thread.method = EASING_METHOD.LINEAR;
thread.ResetInvert(); thread.ResetInvert();
} }
} }
@ -65,6 +66,7 @@ namespace SHADE_Scripting.UI
{ {
thread.duration = durationUp; thread.duration = durationUp;
thread.Reset(1.0f, scaleSize); thread.Reset(1.0f, scaleSize);
thread.method = EASING_METHOD.EASE_OUT_BACK;
} }
else else
{ {