Updated MainMenu and Gameplay UI #433

Merged
maverickdgg merged 8 commits from SP3-20-UI-System into main 2023-03-21 14:48:59 +08:00
25 changed files with 123 additions and 34 deletions
Showing only changes of commit 221e6bde85 - Show all commits

View File

@ -3,6 +3,6 @@
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 58181851
data.textureIndex: 56004904
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 60776650
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: UIMat_MenuBG
ID: 130823048
Type: 7

View File

@ -35,9 +35,9 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -700, y: 350, z: 0.300000012}
Translate: {x: 0, y: 100, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 355.756439, y: 355.756439, z: 1.18585491}
Scale: {x: 600, y: 600, z: 1.18585491}
IsActive: true
Renderable Component:
Mesh: 141771688
@ -60,9 +60,9 @@
NumberOfChildren: 6
Components:
Transform Component:
Translate: {x: -60, y: 0, z: 0}
Translate: {x: 0, y: -400, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 0.899999976, y: 0.899999976, z: 1}
Scale: {x: 0.800000012, y: 0.800000012, z: 1}
IsActive: true
UI Component:
Canvas ID: 0
@ -76,9 +76,9 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -700, y: 100, z: 0.400000006}
Translate: {x: 0, y: 150, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 450, y: 100, z: 1}
Scale: {x: 400, y: 100, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
@ -112,9 +112,9 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -700, y: -525, z: 0.400000006}
Translate: {x: 900, y: 0, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 450, y: 100, z: 1}
Scale: {x: 400, y: 100, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
@ -147,9 +147,9 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -700, y: -25, z: 0.400000006}
Translate: {x: 0, y: 0, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 450, y: 100, z: 1}
Scale: {x: 400, y: 100, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
@ -183,9 +183,9 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -700, y: -150, z: 0.400000006}
Translate: {x: -450, y: 0, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 450, y: 100, z: 1}
Scale: {x: 400, y: 100, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
@ -219,9 +219,9 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -700, y: -275, z: 0.400000006}
Translate: {x: -900, y: 0, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 450, y: 100, z: 1}
Scale: {x: 400, y: 100, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
@ -255,9 +255,9 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -700, y: -400, z: 0.400000006}
Translate: {x: 450, y: 0, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 450, y: 100, z: 1}
Scale: {x: 400, y: 100, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
@ -338,12 +338,12 @@
NumberOfChildren: 0
Components: ~
Scripts:
- Type: TweenManager
- Type: SHADE_Scripting.UI.TweenManager
Enabled: true
- EID: 13
Name: How To Play Canvas
IsActive: false
NumberOfChildren: 5
NumberOfChildren: 6
Components:
Canvas Component:
Canvas Width: 1920
@ -508,6 +508,26 @@
onReleaseSound: event:/UI/button_fail
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 444
Name: SubMenuBackGround
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 2}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 130823048
IsActive: true
UI Component:
Canvas ID: 13
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 19
Name: Options Canvas
IsActive: false
@ -518,14 +538,7 @@
Canvas Height: 1080
Scale by canvas width: false
IsActive: false
Scripts:
- Type: SHADE_Scripting.UI.Options
Enabled: true
masterVolSlider: 29
sfxVolSlider: 30
bgmVolSlider: 31
fovSlider: 37
sensitivitySlider: 38
Scripts: ~
- EID: 20
Name: BackGround
IsActive: true
@ -1082,6 +1095,8 @@
- Type: SHADE_Scripting.UI.SliderText
Enabled: true
sliderObj: 29
minValue: 0
maxValue: 0
- EID: 41
Name: SFX Volume Slider Text
IsActive: true
@ -1107,6 +1122,8 @@
- Type: SHADE_Scripting.UI.SliderText
Enabled: true
sliderObj: 30
minValue: 0
maxValue: 0
- EID: 42
Name: BGM Volume Slider Text
IsActive: true
@ -1132,6 +1149,8 @@
- Type: SHADE_Scripting.UI.SliderText
Enabled: true
sliderObj: 31
minValue: 0
maxValue: 0
- EID: 43
Name: Camera Slider Text Group
IsActive: true
@ -1173,6 +1192,8 @@
- Type: SHADE_Scripting.UI.SliderText
Enabled: true
sliderObj: 37
minValue: 0
maxValue: 0
- EID: 45
Name: Sensitivity Slider Text
IsActive: true
@ -1198,6 +1219,8 @@
- Type: SHADE_Scripting.UI.SliderText
Enabled: true
sliderObj: 38
minValue: 0
maxValue: 0
- EID: 46
Name: Credits Canvas
IsActive: false
@ -1228,11 +1251,7 @@
Hovered: false
Clicked: false
IsActive: true
Scripts:
- Type: SHADE_Scripting.UI.ScrollingCredits
Enabled: true
endY: 4000
duration: 20
Scripts: ~
- EID: 48
Name: BackButton
IsActive: true

View File

@ -10,7 +10,8 @@ using System.Threading.Tasks;
EASE_OUT_SINE,
EASE_OUT_BOUNCE,
EASE_IN_BOUNCE,
EASE_INOUT_BOUNCE
EASE_INOUT_BOUNCE,
LINEAR
}
public static class EasingHelper
@ -45,7 +46,12 @@ public static class EasingHelper
return EaseInOutBounce(value);
}
break;
default:
case EASING_METHOD.LINEAR:
{
return value;
}
break;
default:
return 0.0f;
}
}

View File

@ -31,6 +31,7 @@ namespace SHADE_Scripting.UI
if(transform != null)
{
thread = TweenManager.CreateTweenThread(duration, transform.LocalPosition.y, endY, EASING_METHOD.EASE_IN_SINE);
//thread.SetResetOnInactive(GameObject);
}
}

View File

@ -12,6 +12,8 @@ public class TweenThread
private float value = 0.0f;
public float startValue = 0.0f;
public float endValue = 1.0f;
private GameObject goToCheckActive = GameObject.Null;
public TweenThread(float duration, float startValue, float endValue, EASING_METHOD method)
{
this.duration = duration;
@ -21,6 +23,15 @@ public class TweenThread
}
public void Update(float deltaTime)
{
if (goToCheckActive != GameObject.Null)
{
if (goToCheckActive.IsActiveInHierarchy == false)
{
Reset();
Debug.Log("RESETTING DUE TO INACTIVE");
return;
}
}
if (timer >= duration)
return;
@ -56,6 +67,11 @@ public class TweenThread
{
return value;
}
public void SetResetOnInactive(GameObject go)
{
goToCheckActive = go;
}
}
@ -67,6 +83,9 @@ public class TweenThreadVec3
private Vector3 value = Vector3.Zero;
public Vector3 startValue = Vector3.Zero;
public Vector3 endValue = Vector3.Zero;
private GameObject goToCheckActive = GameObject.Null;
public TweenThreadVec3(float duration, Vector3 startValue, Vector3 endValue, EASING_METHOD method)
{
this.duration = duration;
@ -76,6 +95,16 @@ public class TweenThreadVec3
}
public void Update(float deltaTime)
{
if(goToCheckActive != GameObject.Null)
{
if(goToCheckActive.IsActiveInHierarchy == false)
{
Reset();
return;
}
}
if (timer >= duration)
return;
@ -111,6 +140,11 @@ public class TweenThreadVec3
{
return value;
}
public void SetResetOnInactive(GameObject go)
{
this.goToCheckActive = go;
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_Button_Back
ID: 59813125
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_Button_Level1
ID: 52916516
Type: 3

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_Button_Level2_1
ID: 55380564
Type: 3

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_Button_Level3_1
ID: 53392159
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_BG_MainMenu
ID: 56004904
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_BG_SubMenus
ID: 60776650
Type: 3