diff --git a/Assets/Editor/Editor.SHConfig b/Assets/Editor/Editor.SHConfig index 9bd51ca8..37edf50c 100644 --- a/Assets/Editor/Editor.SHConfig +++ b/Assets/Editor/Editor.SHConfig @@ -1,4 +1,4 @@ Start Maximized: true -Working Scene ID: 86098106 +Working Scene ID: 97158628 Window Size: {x: 1920, y: 1013} Style: 0 \ No newline at end of file diff --git a/Assets/Fonts/Dangrek-Regular.shfont b/Assets/Fonts/Dangrek-Regular.shfont new file mode 100644 index 00000000..cb992fb0 Binary files /dev/null and b/Assets/Fonts/Dangrek-Regular.shfont differ diff --git a/Assets/Fonts/Dangrek-Regular.shfont.shmeta b/Assets/Fonts/Dangrek-Regular.shfont.shmeta new file mode 100644 index 00000000..65f95905 --- /dev/null +++ b/Assets/Fonts/Dangrek-Regular.shfont.shmeta @@ -0,0 +1,3 @@ +Name: Dangrek-Regular +ID: 174412429 +Type: 10 diff --git a/Assets/Fonts/Dangrek-Regular.ttf b/Assets/Fonts/Dangrek-Regular.ttf new file mode 100644 index 00000000..d9f127c7 Binary files /dev/null and b/Assets/Fonts/Dangrek-Regular.ttf differ diff --git a/Assets/Scenes/MainGame.shade b/Assets/Scenes/MainGame.shade index 4e58a29b..cba78bdb 100644 --- a/Assets/Scenes/MainGame.shade +++ b/Assets/Scenes/MainGame.shade @@ -9621,26 +9621,6 @@ Clicked: false IsActive: true Scripts: ~ -- EID: 139 - Name: Multiplier - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -800, y: 300, z: 0} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 60, y: 60, z: 60} - IsActive: true - Text Renderer Component: - Text: TEST - Font: 176667660 - IsActive: true - UI Component: - Canvas ID: 199 - Hovered: false - Clicked: false - IsActive: true - Scripts: ~ - EID: 11 Name: GamePause IsActive: true @@ -9661,15 +9641,35 @@ Clicked: false IsActive: true Scripts: ~ -- EID: 462 - Name: Score BG +- EID: 139 + Name: Multiplier Text IsActive: true NumberOfChildren: 1 Components: Transform Component: - Translate: {x: -850, y: 450, z: 0} + Translate: {x: -800, y: 300, z: 0} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 400, y: 100, z: 1} + Scale: {x: 60, y: 60.0000038, z: 60} + IsActive: true + Text Renderer Component: + Text: TEST + Font: 176667660 + IsActive: true + UI Component: + Canvas ID: 199 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 463 + Name: Multiplier BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.833334029, y: 0.416666061, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 5, y: 1.66666651, z: 0.0166666675} IsActive: true Renderable Component: Mesh: 141771688 @@ -9684,12 +9684,12 @@ - EID: 237 Name: Score Text IsActive: true - NumberOfChildren: 0 + NumberOfChildren: 1 Components: Transform Component: - Translate: {x: -0.050249815, y: -0.300000191, z: 0} + Translate: {x: -770.099915, y: 419.999969, z: 0} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 0.150000006, y: 0.600000024, z: 60} + Scale: {x: 60.0000038, y: 60.0000038, z: 60} IsActive: true Text Renderer Component: Text: My name is Brandon. @@ -9701,6 +9701,26 @@ Clicked: false IsActive: true Scripts: ~ +- EID: 462 + Name: Score BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.334998131, y: 0.500000477, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 6.66666603, y: 1.66666651, z: 0.0166666675} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 129340704 + IsActive: true + UI Component: + Canvas ID: 199 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ - EID: 198 Name: ====Raccoon==== IsActive: true diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index 17fb1a8e..67416722 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -538,7 +538,7 @@ IsActive: true Text Renderer Component: Text: Options - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -558,7 +558,7 @@ IsActive: true Text Renderer Component: Text: Audio - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -594,7 +594,7 @@ IsActive: true Text Renderer Component: Text: Master - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -614,7 +614,7 @@ IsActive: true Text Renderer Component: Text: SFX - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -634,7 +634,7 @@ IsActive: true Text Renderer Component: Text: BGM - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -673,7 +673,7 @@ Material: 128676209 IsActive: true Slider Component: - Slider Value: 0 + Slider Value: 1 IsActive: true UI Component: Canvas ID: 19 @@ -696,7 +696,7 @@ Material: 128676209 IsActive: true Slider Component: - Slider Value: 0 + Slider Value: 1 IsActive: true UI Component: Canvas ID: 19 @@ -719,7 +719,7 @@ Material: 128676209 IsActive: true Slider Component: - Slider Value: 0 + Slider Value: 1 IsActive: true UI Component: Canvas ID: 19 @@ -739,7 +739,7 @@ IsActive: true Text Renderer Component: Text: Camera - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -775,7 +775,7 @@ IsActive: true Text Renderer Component: Text: FOV - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -795,7 +795,7 @@ IsActive: true Text Renderer Component: Text: Sensitivity - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -834,7 +834,7 @@ Material: 128676209 IsActive: true Slider Component: - Slider Value: 0 + Slider Value: 1 IsActive: true UI Component: Canvas ID: 19 @@ -857,7 +857,7 @@ Material: 128676209 IsActive: true Slider Component: - Slider Value: 0 + Slider Value: 1 IsActive: true UI Component: Canvas ID: 19 @@ -893,7 +893,7 @@ IsActive: true Text Renderer Component: Text: 100 - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -918,7 +918,7 @@ IsActive: true Text Renderer Component: Text: 100 - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -943,7 +943,7 @@ IsActive: true Text Renderer Component: Text: 100 - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -984,7 +984,7 @@ IsActive: true Text Renderer Component: Text: 100 - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -1009,7 +1009,7 @@ IsActive: true Text Renderer Component: Text: 100 - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 19 @@ -1093,7 +1093,7 @@ IsActive: true Text Renderer Component: Text: Credits - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 46 @@ -1172,7 +1172,7 @@ IsActive: true Text Renderer Component: Text: Level Select - Font: 176667660 + Font: 174412429 IsActive: true UI Component: Canvas ID: 50 diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index 3657904b..651ba7ec 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -100,7 +100,7 @@ public class GameManager : Script if (itemScored) { multiplierText.GetComponent().Text = $"X {currMultiplierCombo}"; - multiplierText.GetComponent().LocalScale -= fontScalar * Time.DeltaTimeF; + //multiplierText.GetComponent().LocalScale -= fontScalar * Time.DeltaTimeF; currMultiplierDuration += Time.DeltaTimeF; if (currMultiplierDuration >= maxMultiplierDuration) @@ -113,7 +113,7 @@ public class GameManager : Script } else { - multiplierText.GetComponent().LocalScale = Vector3.Zero; + //multiplierText.GetComponent().LocalScale = Vector3.Zero; } if ((timer > 0 && totalItemCount <= 0) || Input.GetKeyDown(Input.KeyCode.F1)) diff --git a/Assets/Scripts/UI/SC_SliderText.cs b/Assets/Scripts/UI/SC_SliderText.cs index 54d59f28..e3f5a8b3 100644 --- a/Assets/Scripts/UI/SC_SliderText.cs +++ b/Assets/Scripts/UI/SC_SliderText.cs @@ -14,7 +14,17 @@ namespace SHADE_Scripting.UI public int minValue = 0; public int maxValue = 0; + protected override void start() + { + Slider slider = sliderObj.GetComponent(); + TextRenderable text = GetComponent(); + + if (slider != null && text != null) + { + text.Text = ((int)(slider.GetValue() * (maxValue - minValue) + minValue)).ToString(); + } + } protected override void update() { Slider slider = sliderObj.GetComponent(); diff --git a/SHADE_Engine/src/UI/SHUISystem.cpp b/SHADE_Engine/src/UI/SHUISystem.cpp index 05bd9ab5..87a6552d 100644 --- a/SHADE_Engine/src/UI/SHUISystem.cpp +++ b/SHADE_Engine/src/UI/SHUISystem.cpp @@ -432,16 +432,25 @@ namespace SHADE if (comp.GetValue() < 0.0f) comp.value = 0.0f; } - - if (comp.GetValue() != tempValue) + try { - //Set shader value. - auto renderable = SHComponentManager::GetComponent_s(comp.GetEID()); //auto texture = SHResourceManager::Get(comp.GetDefaultTexture()); auto material = renderable->GetModifiableMaterial(); - - material->SetProperty("data.sliderThreshold", comp.GetValue()); + if (renderable) + { + if (comp.GetValue() != material->GetProperty("data.sliderThreshold")) + { + //Set shader value. + + material->SetProperty("data.sliderThreshold", comp.GetValue()); + + } + } + + } + catch (...) + { }