From 664d4d49852794980add504b495087bccf294114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Cern=C3=BD?= <cernym65@fit.cvut.cz> Date: Sat, 21 Jan 2023 05:31:39 +0100 Subject: [PATCH] move win and phase to Level5Controller --- Assets/SZZ/Code/Scripts/Level/GameState.cs | 20 +- .../Code/Scripts/Level/Level3Controller.cs | 6 +- .../Code/Scripts/Level/Level5Controller.cs | 19 +- Assets/SZZ/Code/Scripts/MoveToClick.cs | 1 - .../Code/Scripts/NPCs/SuccessfullStudent.cs | 16 +- Assets/SZZ/Code/Scripts/NPCs/Tajemnik.cs | 30 +-- Assets/SZZ/Code/Scripts/NPCs/Zkousejici.cs | 20 +- .../SZZ/Code/Scripts/Player/MovementInput.cs | 13 +- Assets/SZZ/Code/Scripts/View.cs | 1 + Assets/SZZ/Level/Scenes/building a.unity | 237 +----------------- Assets/SZZ/Prefabs/Logic/GameState.prefab | 11 +- Assets/SZZ/Prefabs/Logic/View.prefab | 214 ++++++++++++++++ 12 files changed, 314 insertions(+), 274 deletions(-) diff --git a/Assets/SZZ/Code/Scripts/Level/GameState.cs b/Assets/SZZ/Code/Scripts/Level/GameState.cs index a71b379..b9ec328 100644 --- a/Assets/SZZ/Code/Scripts/Level/GameState.cs +++ b/Assets/SZZ/Code/Scripts/Level/GameState.cs @@ -40,6 +40,8 @@ public string currentQuest { [NonSerialized] public Level4Controller level4Controller; [NonSerialized] public Level5Controller level5Controller; + public Action onLevelChange { get; set; } + private void Awake() { if (instance is not null) Debug.LogWarning("More than one GameState in the scene"); @@ -53,8 +55,7 @@ private void Awake() { level4Controller = GetComponent<Level4Controller>(); level5Controller = GetComponent<Level5Controller>(); - DisableAllLevelControllers(); - level0Controller.enabled = true; + StartLevel0(); } private void OnDisable() { @@ -65,6 +66,16 @@ public static GameState GetInstance() { return instance; } + public void StartLevel0() { + if (currentLevel == 0) + return; + + currentLevel = 0; + DisableAllLevelControllers(); + level0Controller.enabled = true; + onLevelChange?.Invoke(); + } + public void StartLevel1() { if (currentLevel == 1) return; @@ -72,6 +83,7 @@ public void StartLevel1() { currentLevel = 1; DisableAllLevelControllers(); level1Controller.enabled = true; + onLevelChange?.Invoke(); } public void StartLevel2() { @@ -81,6 +93,7 @@ public void StartLevel2() { currentLevel = 2; DisableAllLevelControllers(); level2Controller.enabled = true; + onLevelChange?.Invoke(); } public void StartLevel3() { @@ -90,6 +103,7 @@ public void StartLevel3() { currentLevel = 3; DisableAllLevelControllers(); level3Controller.enabled = true; + onLevelChange?.Invoke(); } public void StartLevel4() { @@ -99,6 +113,7 @@ public void StartLevel4() { currentLevel = 4; DisableAllLevelControllers(); level4Controller.enabled = true; + onLevelChange?.Invoke(); } public void StartLevel5() { @@ -108,6 +123,7 @@ public void StartLevel5() { currentLevel = 5; DisableAllLevelControllers(); level5Controller.enabled = true; + onLevelChange?.Invoke(); } public void GameOver() { diff --git a/Assets/SZZ/Code/Scripts/Level/Level3Controller.cs b/Assets/SZZ/Code/Scripts/Level/Level3Controller.cs index 06f1415..2b18546 100644 --- a/Assets/SZZ/Code/Scripts/Level/Level3Controller.cs +++ b/Assets/SZZ/Code/Scripts/Level/Level3Controller.cs @@ -24,7 +24,7 @@ private void Start() { adviceCountImageContainer.enabled = false; } - private void OnDisable() { + private void OnDisable() { if (adviceCountField is not null) // scene was destroyed return; @@ -33,7 +33,7 @@ private void OnDisable() { adviceCountImageContainer.enabled = false; } - public void GetAdvice(){ + public void GetAdvice() { if (game is null || game.currentLevel != 3) return; game.adviceAmount++; @@ -41,7 +41,7 @@ public void GetAdvice(){ SetImage(game.adviceAmount); } - private void SetImage(int index) { + private void SetImage(int index) { if (adviceCountImages.Length >= index && index > 0) adviceCountImageContainer.sprite = adviceCountImages[index - 1]; } diff --git a/Assets/SZZ/Code/Scripts/Level/Level5Controller.cs b/Assets/SZZ/Code/Scripts/Level/Level5Controller.cs index b206bcd..4353732 100644 --- a/Assets/SZZ/Code/Scripts/Level/Level5Controller.cs +++ b/Assets/SZZ/Code/Scripts/Level/Level5Controller.cs @@ -3,8 +3,25 @@ using UnityEngine; public class Level5Controller : MonoBehaviour { + [SerializeField] int questionsNeeded = 2; + + private int _questionsAnswered = 0; + public int questionsAnswered { + get { + return _questionsAnswered; + } + set { + _questionsAnswered = value; + if (_questionsAnswered >= questionsNeeded) { + win = true; + phase = 3; + } + } + } + public bool win = false; + public int phase = 0; + private GameState game; - public int questionsAnswered = 0; private void Start() { game = GameState.GetInstance(); diff --git a/Assets/SZZ/Code/Scripts/MoveToClick.cs b/Assets/SZZ/Code/Scripts/MoveToClick.cs index 54feff2..cbbe863 100644 --- a/Assets/SZZ/Code/Scripts/MoveToClick.cs +++ b/Assets/SZZ/Code/Scripts/MoveToClick.cs @@ -4,7 +4,6 @@ using UnityEngine.AI; using UnityEngine.InputSystem; -// TODO remove public class MoveToClick : MonoBehaviour { [SerializeField] private new Camera camera; diff --git a/Assets/SZZ/Code/Scripts/NPCs/SuccessfullStudent.cs b/Assets/SZZ/Code/Scripts/NPCs/SuccessfullStudent.cs index 4dae843..c6547ae 100644 --- a/Assets/SZZ/Code/Scripts/NPCs/SuccessfullStudent.cs +++ b/Assets/SZZ/Code/Scripts/NPCs/SuccessfullStudent.cs @@ -4,18 +4,17 @@ using Ink.Runtime; using UnityEngine.SceneManagement; -public class SuccessfullStudent : MonoBehaviour -{ +public class SuccessfullStudent : MonoBehaviour { private bool firstEncounter = true; private GameState game; void Start() { game = GameState.GetInstance(); + game.onLevelChange += DestroyOnLevel1; } - void Update() - { - if (game.currentLevel > 0) - Destroy(gameObject); + + private void OnDisable() { + game.onLevelChange -= DestroyOnLevel1; } public void DialogueStart(Story story) { @@ -28,4 +27,9 @@ public void DialogueStart(Story story) { public void DialogueFinish(Story story) { firstEncounter = false; } + + private void DestroyOnLevel1() { + if (game.currentLevel > 0) + Destroy(gameObject); + } } diff --git a/Assets/SZZ/Code/Scripts/NPCs/Tajemnik.cs b/Assets/SZZ/Code/Scripts/NPCs/Tajemnik.cs index fe82857..472198b 100644 --- a/Assets/SZZ/Code/Scripts/NPCs/Tajemnik.cs +++ b/Assets/SZZ/Code/Scripts/NPCs/Tajemnik.cs @@ -4,11 +4,8 @@ using Ink.Runtime; using UnityEngine.SceneManagement; -public class Tajemnik : MonoBehaviour -{ +public class Tajemnik : MonoBehaviour { private bool firstEncounter = true; - private bool win = false; - private int phase = 0; private GameState game; @@ -16,34 +13,23 @@ public void Start() { game = GameState.GetInstance(); } - private void Update(){ - setWin(); - } - public void DialogueStart(Story story) { - if(game.currentLevel == 4) // 4 jakoze mezilevel + if (game.currentLevel == 4) // 4 jakoze mezilevel story.variablesState["firstEncounter"] = firstEncounter; else story.variablesState["firstEncounter"] = false; - story.variablesState["win"] = win; - story.variablesState["phase"] = phase; + story.variablesState["win"] = game.level5Controller.win; + story.variablesState["phase"] = game.level5Controller.phase; Debug.Log("Tajemnik - dialog start"); } public void DialogueFinish(Story story) { - if (game.currentLevel == 4){ + if (game.currentLevel == 4) { firstEncounter = false; game.StartLevel5(); - phase = 2; - } - if(win) + game.level5Controller.phase = 2; + } + if (game.level5Controller.win) SceneManager.LoadScene(3); } - - private void setWin(){ - if(game.level5Controller.questionsAnswered == 2){ - win = true; - phase = 3; - } - } } diff --git a/Assets/SZZ/Code/Scripts/NPCs/Zkousejici.cs b/Assets/SZZ/Code/Scripts/NPCs/Zkousejici.cs index 35100db..307220b 100644 --- a/Assets/SZZ/Code/Scripts/NPCs/Zkousejici.cs +++ b/Assets/SZZ/Code/Scripts/NPCs/Zkousejici.cs @@ -4,18 +4,21 @@ using Ink.Runtime; using UnityEngine.SceneManagement; -public class Zkousejici : MonoBehaviour -{ - +public class Zkousejici : MonoBehaviour { private bool firstEncounter = true; + private GameState game; + private View view; public void Start() { game = GameState.GetInstance(); + view = View.GetInstance(); } public void DialogueStart(Story story) { - if(game.currentLevel == 5) + view.freezeMovement = true; + + if (game.currentLevel == 5) story.variablesState["firstEncounter"] = firstEncounter; else story.variablesState["firstEncounter"] = false; @@ -23,12 +26,15 @@ public void DialogueStart(Story story) { } public void DialogueFinish(Story story) { - if(firstEncounter) + view.freezeMovement = false; + + if (firstEncounter) game.level5Controller.questionsAnswered++; + firstEncounter = false; game.mistakesRemaining = (int)story.variablesState["available_mistakes"]; - if (game.mistakesRemaining < 0){ + + if (game.mistakesRemaining < 0) game.GameOver(); - } } } diff --git a/Assets/SZZ/Code/Scripts/Player/MovementInput.cs b/Assets/SZZ/Code/Scripts/Player/MovementInput.cs index 76f144e..5cb2adf 100644 --- a/Assets/SZZ/Code/Scripts/Player/MovementInput.cs +++ b/Assets/SZZ/Code/Scripts/Player/MovementInput.cs @@ -17,6 +17,7 @@ public class MovementInput : MonoBehaviour { private static MovementInput instance; + private View view; private PlayerInput playerInput; private InputAction moveAction; @@ -42,6 +43,8 @@ public static MovementInput GetInstance() { } private void Start() { + view = View.GetInstance(); + moveAction = playerInput.actions["Player/Move"]; lookAction = playerInput.actions["Player/Look"]; jumpAction = playerInput.actions["Player/Jump"]; @@ -49,10 +52,12 @@ private void Start() { } private void Update() { - Move(); - Look(); - Jump(); - Sprint(); + if (!view.freezeMovement) { + Move(); + Look(); + Jump(); + Sprint(); + } } private void Move() { diff --git a/Assets/SZZ/Code/Scripts/View.cs b/Assets/SZZ/Code/Scripts/View.cs index bea452f..07b6010 100644 --- a/Assets/SZZ/Code/Scripts/View.cs +++ b/Assets/SZZ/Code/Scripts/View.cs @@ -22,6 +22,7 @@ public class View : MonoBehaviour { public CinemachineVirtualCamera followCamera { get { return _followCamera; } } public bool isPaused { get; private set; } = false; + public bool freezeMovement { get; set; } = false; public Action OnResume { get; set; } public Action OnPause { get; set; } diff --git a/Assets/SZZ/Level/Scenes/building a.unity b/Assets/SZZ/Level/Scenes/building a.unity index b6c240e..8184168 100644 --- a/Assets/SZZ/Level/Scenes/building a.unity +++ b/Assets/SZZ/Level/Scenes/building a.unity @@ -27482,12 +27482,6 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1124773976} m_PrefabAsset: {fileID: 0} ---- !u!224 &1133190925 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 6909880372566592212, guid: 39967ec940f6f104eabe57a2974f7ab0, - type: 3} - m_PrefabInstance: {fileID: 6909880373026362732} - m_PrefabAsset: {fileID: 0} --- !u!1001 &1133271054 PrefabInstance: m_ObjectHideFlags: 0 @@ -32732,82 +32726,18 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1331117494} m_PrefabAsset: {fileID: 0} ---- !u!1 &1331885961 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1331885962} - - component: {fileID: 1331885964} - - component: {fileID: 1331885963} - m_Layer: 5 - m_Name: AdviceContainer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1331885962 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1331885961} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1133190925} - m_RootOrder: 8 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -598.5343, y: 402.43893} - m_SizeDelta: {x: 100, y: 75} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1331885963 +--- !u!114 &1331885963 stripped MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 5805328913245965079, guid: 39967ec940f6f104eabe57a2974f7ab0, + type: 3} + m_PrefabInstance: {fileID: 6909880373026362732} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1331885961} + m_GameObject: {fileID: 0} m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 0, b: 0, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1331885964 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1331885961} - m_CullTransparentMesh: 1 --- !u!1001 &1332214443 PrefabInstance: m_ObjectHideFlags: 0 @@ -33647,142 +33577,18 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1367975085} m_PrefabAsset: {fileID: 0} ---- !u!1 &1370953767 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1370953768} - - component: {fileID: 1370953770} - - component: {fileID: 1370953769} - m_Layer: 5 - m_Name: Advice counter - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1370953768 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1370953767} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.8, y: 1.8, z: 1.8} - m_ConstrainProportionsScale: 1 - m_Children: [] - m_Father: {fileID: 1133190925} - m_RootOrder: 7 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: -712, y: 325.7} - m_SizeDelta: {x: 196.1, y: 54.9} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1370953769 +--- !u!114 &1370953769 stripped MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} + m_CorrespondingSourceObject: {fileID: 8392563332192246038, guid: 39967ec940f6f104eabe57a2974f7ab0, + type: 3} + m_PrefabInstance: {fileID: 6909880373026362732} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1370953767} + m_GameObject: {fileID: 0} m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: "Obdr\u017Een\xE9 rady:" - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 6eed2a89ac900a14b939500fdced8c08, type: 2} - m_sharedMaterial: {fileID: 3561134238486093195, guid: 6eed2a89ac900a14b939500fdced8c08, - type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 16 - m_fontSizeBase: 16 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 1 - m_VerticalAlignment: 256 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &1370953770 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1370953767} - m_CullTransparentMesh: 1 --- !u!1001 &1373634734 PrefabInstance: m_ObjectHideFlags: 0 @@ -54729,29 +54535,6 @@ PrefabInstance: propertyPath: adviceCountImageContainer value: objectReference: {fileID: 1331885963} - - target: {fileID: 6330820102716056177, guid: 1eb73f1b5311760469cc6e221f2538a9, - type: 3} - propertyPath: adviceCountImages.Array.size - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 6330820102716056177, guid: 1eb73f1b5311760469cc6e221f2538a9, - type: 3} - propertyPath: adviceCountImages.Array.data[0] - value: - objectReference: {fileID: 21300000, guid: 2e2851c89d5e3334cba531ad65cc058b, - type: 3} - - target: {fileID: 6330820102716056177, guid: 1eb73f1b5311760469cc6e221f2538a9, - type: 3} - propertyPath: adviceCountImages.Array.data[1] - value: - objectReference: {fileID: 21300000, guid: 658680974a76f424bb2f550316cfe863, - type: 3} - - target: {fileID: 6330820102716056177, guid: 1eb73f1b5311760469cc6e221f2538a9, - type: 3} - propertyPath: adviceCountImages.Array.data[2] - value: - objectReference: {fileID: 21300000, guid: 390d3f8e7977386478b48a12f6fcc344, - type: 3} - target: {fileID: 6330820102716056179, guid: 1eb73f1b5311760469cc6e221f2538a9, type: 3} propertyPath: cheatCountField diff --git a/Assets/SZZ/Prefabs/Logic/GameState.prefab b/Assets/SZZ/Prefabs/Logic/GameState.prefab index 1acdfe0..ab15978 100644 --- a/Assets/SZZ/Prefabs/Logic/GameState.prefab +++ b/Assets/SZZ/Prefabs/Logic/GameState.prefab @@ -469,6 +469,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 57d993d500036ee4985e11ecb24c4704, type: 3} m_Name: m_EditorClassIdentifier: + adviceCountFieldPrefix: "Obdr\u017Een\xE9 rady: " + adviceCountField: {fileID: 0} + adviceCountImageContainer: {fileID: 0} + adviceCountImages: + - {fileID: 21300000, guid: 2e2851c89d5e3334cba531ad65cc058b, type: 3} + - {fileID: 21300000, guid: 658680974a76f424bb2f550316cfe863, type: 3} + - {fileID: 21300000, guid: 390d3f8e7977386478b48a12f6fcc344, type: 3} timer: {fileID: 6330820102687515709} --- !u!114 &2326261974615084694 MonoBehaviour: @@ -494,7 +501,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4e231cfb3018ad5448fc77edeabb3ef6, type: 3} m_Name: m_EditorClassIdentifier: - questionsAnswered: 0 + questionsNeeded: 2 + win: 0 + phase: 0 --- !u!1 &6330820103093283611 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/SZZ/Prefabs/Logic/View.prefab b/Assets/SZZ/Prefabs/Logic/View.prefab index 9693c92..f07f5bf 100644 --- a/Assets/SZZ/Prefabs/Logic/View.prefab +++ b/Assets/SZZ/Prefabs/Logic/View.prefab @@ -76,6 +76,218 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4772804458903080262 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2626581101378531366} + - component: {fileID: 5779271494591878192} + - component: {fileID: 5805328913245965079} + m_Layer: 5 + m_Name: AdviceContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2626581101378531366 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4772804458903080262} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6909880372566592212} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -598.5343, y: 402.43893} + m_SizeDelta: {x: 100, y: 75} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5779271494591878192 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4772804458903080262} + m_CullTransparentMesh: 1 +--- !u!114 &5805328913245965079 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4772804458903080262} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5225306237567813460 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4800467682479892348} + - component: {fileID: 3547427620791417268} + - component: {fileID: 8392563332192246038} + m_Layer: 5 + m_Name: Advice counter + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4800467682479892348 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5225306237567813460} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.8, y: 1.8, z: 1.8} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 6909880372566592212} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: -712, y: 325.7} + m_SizeDelta: {x: 196.1, y: 54.9} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3547427620791417268 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5225306237567813460} + m_CullTransparentMesh: 1 +--- !u!114 &8392563332192246038 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5225306237567813460} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "Obdr\u017Een\xE9 rady:" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 6eed2a89ac900a14b939500fdced8c08, type: 2} + m_sharedMaterial: {fileID: 3561134238486093195, guid: 6eed2a89ac900a14b939500fdced8c08, + type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 16 + m_fontSizeBase: 16 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &6909880371816490730 GameObject: m_ObjectHideFlags: 0 @@ -976,6 +1188,8 @@ RectTransform: - {fileID: 6909880373661998350} - {fileID: 6909880373574815807} - {fileID: 480444433691404185} + - {fileID: 4800467682479892348} + - {fileID: 2626581101378531366} m_Father: {fileID: 6909880373640339007} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} -- GitLab