mirror of
https://github.com/nothke/quality-control.git
synced 2026-10-11 19:28:55 +00:00
UI ups
This commit is contained in:
1 parent
8df84480d3
commit
ff6b95b251
6 files changed
+4114
-19
No files matched your search
+3921
-4
File diff suppressed because it is too large.
Load diff
@@ -10,6 +10,10 @@ public class Scoreboard: MonoBehaviour
|
||||
public static Scoreboard Instance;
|
||||
public LevelObjective CurrentObjective;
|
||||
|
||||
public LevelObjective Stage1Objective;
|
||||
public LevelObjective Stage2Objective;
|
||||
public LevelObjective Stage3Objective;
|
||||
|
||||
public Dictionary<ProductType, Vector2Int> ProductCounts = new ();
|
||||
|
||||
public float _timeLeft;
|
||||
@@ -25,9 +29,21 @@ public class Scoreboard: MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void Start()
|
||||
public void StartStage(StagingManager.StageEnum stage)
|
||||
{
|
||||
SetObjective(CurrentObjective);
|
||||
switch (stage)
|
||||
{
|
||||
case StagingManager.StageEnum.Level1:
|
||||
SetObjective(Stage1Objective);
|
||||
break;
|
||||
case StagingManager.StageEnum.Level2:
|
||||
SetObjective(Stage2Objective);
|
||||
break;
|
||||
case StagingManager.StageEnum.Level3:
|
||||
SetObjective(Stage3Objective);
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateText();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8929854d39c43b68703c565297a73f1
|
||||
timeCreated: 1724110207
|
||||
@@ -0,0 +1,91 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIManager: MonoBehaviour
|
||||
{
|
||||
public enum UIState
|
||||
{
|
||||
MainMenu = 0,
|
||||
Game = 1,
|
||||
Pause = 2,
|
||||
HowToPlay = 3,
|
||||
StageSelect = 4,
|
||||
ConfirmQuit = 5,
|
||||
}
|
||||
|
||||
public List<UIState> StateStack = new List<UIState>() {UIState.MainMenu};
|
||||
|
||||
public GameObject MainMenu;
|
||||
public GameObject Reticle;
|
||||
public GameObject HowToPlay;
|
||||
public GameObject StageSelect;
|
||||
public GameObject ConfirmQuit;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
MainMenu.SetActive(false);
|
||||
Reticle.SetActive(false);
|
||||
HowToPlay.SetActive(false);
|
||||
StageSelect.SetActive(false);
|
||||
ConfirmQuit.SetActive(false);
|
||||
|
||||
PushState(UIState.MainMenu);
|
||||
}
|
||||
|
||||
public void PushState(UIState state)
|
||||
{
|
||||
if (StateStack.Count > 0)
|
||||
{
|
||||
OnExitState(StateStack[0]);
|
||||
}
|
||||
|
||||
StateStack.Add(state);
|
||||
OnEnterState(state);
|
||||
}
|
||||
|
||||
public void PopState()
|
||||
{
|
||||
if (StateStack.Count > 0)
|
||||
{
|
||||
OnExitState(StateStack[0]);
|
||||
StateStack.RemoveAt(0);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnterState(UIState state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case UIState.MainMenu:
|
||||
MainMenu.SetActive(true);
|
||||
break;
|
||||
case UIState.Game:
|
||||
Reticle.SetActive(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnExitState(UIState state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case UIState.MainMenu:
|
||||
MainMenu.SetActive(false);
|
||||
break;
|
||||
case UIState.Game:
|
||||
Reticle.SetActive(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void StartStage(int stage)
|
||||
{
|
||||
Scoreboard.Instance.StartStage((StagingManager.StageEnum)stage);
|
||||
PushState(UIState.Game);
|
||||
}
|
||||
|
||||
public void Quit()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d007036093842af8034f1c5e5c1e7e8
|
||||
timeCreated: 1724110214
|
||||
+78
-13
@@ -2,20 +2,24 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2180264
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: LiberationSans SDF Material
|
||||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
@@ -67,6 +71,7 @@ Material:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
@@ -148,6 +153,7 @@ Material:
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -165,15 +171,16 @@ MonoBehaviour:
|
||||
materialHashCode: 462855346
|
||||
m_Version: 1.1.0
|
||||
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
|
||||
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75,
|
||||
type: 3}
|
||||
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
|
||||
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
|
||||
m_AtlasPopulationMode: 1
|
||||
m_FaceInfo:
|
||||
m_FaceIndex: 0
|
||||
m_FamilyName: Liberation Sans
|
||||
m_StyleName: Regular
|
||||
m_PointSize: 86
|
||||
m_Scale: 1
|
||||
m_UnitsPerEM: 0
|
||||
m_LineHeight: 98.8916
|
||||
m_AscentLine: 77.853516
|
||||
m_CapLine: 59
|
||||
@@ -189,18 +196,68 @@ MonoBehaviour:
|
||||
m_StrikethroughOffset: 18
|
||||
m_StrikethroughThickness: 6.298828
|
||||
m_TabWidth: 24
|
||||
m_GlyphTable: []
|
||||
m_CharacterTable: []
|
||||
m_GlyphTable:
|
||||
- m_Index: 962
|
||||
m_Metrics:
|
||||
m_Width: 45
|
||||
m_Height: 59
|
||||
m_HorizontalBearingX: 7
|
||||
m_HorizontalBearingY: 59
|
||||
m_HorizontalAdvance: 56
|
||||
m_GlyphRect:
|
||||
m_X: 10
|
||||
m_Y: 10
|
||||
m_Width: 45
|
||||
m_Height: 59
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
- m_Index: 967
|
||||
m_Metrics:
|
||||
m_Width: 77
|
||||
m_Height: 59
|
||||
m_HorizontalBearingX: 1
|
||||
m_HorizontalBearingY: 59
|
||||
m_HorizontalAdvance: 79
|
||||
m_GlyphRect:
|
||||
m_X: 74
|
||||
m_Y: 10
|
||||
m_Width: 77
|
||||
m_Height: 59
|
||||
m_Scale: 1
|
||||
m_AtlasIndex: 0
|
||||
m_ClassDefinitionType: 0
|
||||
m_CharacterTable:
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 1041
|
||||
m_GlyphIndex: 962
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 1046
|
||||
m_GlyphIndex: 967
|
||||
m_Scale: 1
|
||||
m_AtlasTextures:
|
||||
- {fileID: 28268798066460806}
|
||||
m_AtlasTextureIndex: 0
|
||||
m_IsMultiAtlasTexturesEnabled: 0
|
||||
m_ClearDynamicDataOnBuild: 1
|
||||
m_UsedGlyphRects: []
|
||||
m_FreeGlyphRects:
|
||||
m_UsedGlyphRects:
|
||||
- m_X: 0
|
||||
m_Y: 0
|
||||
m_Width: 64
|
||||
m_Height: 78
|
||||
- m_X: 64
|
||||
m_Y: 0
|
||||
m_Width: 96
|
||||
m_Height: 78
|
||||
m_FreeGlyphRects:
|
||||
- m_X: 0
|
||||
m_Y: 78
|
||||
m_Width: 511
|
||||
m_Height: 433
|
||||
- m_X: 160
|
||||
m_Y: 0
|
||||
m_Width: 351
|
||||
m_Height: 511
|
||||
m_fontInfo:
|
||||
Name: Liberation Sans
|
||||
@@ -313,15 +370,21 @@ Texture2D:
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_ForcedFallbackFormat: 4
|
||||
m_DownscaleFallback: 0
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 2
|
||||
m_Width: 0
|
||||
m_Height: 0
|
||||
m_CompleteImageSize: 0
|
||||
m_Width: 512
|
||||
m_Height: 512
|
||||
m_CompleteImageSize: 262144
|
||||
m_MipsStripped: 0
|
||||
m_TextureFormat: 1
|
||||
m_MipCount: 1
|
||||
m_IsReadable: 1
|
||||
m_IsPreProcessed: 0
|
||||
m_IgnoreMipmapLimit: 0
|
||||
m_MipmapLimitGroupName:
|
||||
m_StreamingMipmaps: 0
|
||||
m_StreamingMipmapsPriority: 0
|
||||
m_VTOnly: 0
|
||||
m_AlphaIsTransparency: 0
|
||||
m_ImageCount: 1
|
||||
m_TextureDimension: 2
|
||||
@@ -335,9 +398,11 @@ Texture2D:
|
||||
m_WrapW: 0
|
||||
m_LightmapFormat: 0
|
||||
m_ColorSpace: 0
|
||||
image data: 0
|
||||
_typelessdata:
|
||||
m_PlatformBlob:
|
||||
image data: 262144
|
||||
_typelessdata: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050a0f121313131313131313131313131313131313131313131313131313131211100e0c090806030000000000000000000000000000000000000000000000000002070a0c0d131313131313131311070603000000000000000000000000000000000002060a0c0d131313131313130d0d0b070200000000000000000000000000000000000306071113131313131313130d0c0a0702000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010910161b1e2020202020202020202020202020202020202020202020202020201f1e1d1b181515120f0a0603000000000000000000000000000000000000000000070d1316191a20202020202020201d1312100b060000000000000000000000000000070d12161919202020202020201a1917130e080100000000000000000000000000060b1012131d20202020202020201a1916130d0700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010a131b21272b2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2c2c2b29272522211f1b15130f0a040000000000000000000000000000000000010a12191e2325262d2d2d2d2d2d2d2d2a201f1c17110a0200000000000000000000010a12191e2325262d2d2d2d2d2d2d2726231f19120a0200000000000000000000020a11171c1f202a2d2d2d2d2d2d2d2d2625231e19120a01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009131c252c333739393939393939393939393939393939393939393939393939393939373634322f2e2b26211f1b150f0a040000000000000000000000000000000a131c242a2f32333939393939393939372d2b28231c140c020000000000000000000a131c232a2f32333939393939393934332f2b241c140a010000000000000000020c141c23282b2d37393939393939393933322f2a241c130a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Line truncated
|
||||
m_StreamData:
|
||||
serializedVersion: 2
|
||||
offset: 0
|
||||
size: 0
|
||||
path:
|
||||
Reference in new issue
Block a user