From e8ef8fea831d3fa565ac1cabe4b9684793836660 Mon Sep 17 00:00:00 2001 From: Igor Monardez Date: Wed, 24 May 2023 14:53:13 -0300 Subject: [PATCH 01/13] =?UTF-8?q?CG-181=20por=20Igor=20Mon=C3=A1rdez:=20Pr?= =?UTF-8?q?omo=C3=A7=C3=A3o=20de=20pe=C3=A3o=20para=20rainha=20apenas=20e?= =?UTF-8?q?=20come=C3=A7o=20da=20retirada=20de=20pe=C3=A7as=20para=20o=20l?= =?UTF-8?q?ado=20do=20tabuleiro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess-game-project/Assets/Scripts/Chessman.cs | 62 +++---- chess-game-project/Assets/Scripts/Game.cs | 9 + .../Assets/Scripts/MovePlate.cs | 36 +++- .../UserSettings/EditorUserSettings.asset | 4 +- .../UserSettings/Layouts/default-2021.dwlt | 160 +++++++++--------- 5 files changed, 155 insertions(+), 116 deletions(-) diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index 19f5de0..468fba5 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -95,6 +95,15 @@ public void SetYBoard(int y) yBoard = y; } + public Sprite GetWhiteQueen() + { + return whiteQueen; + } + public Sprite GetBlackQueen() + { + return blackQueen; + } + /* Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. Nesse caso, essa OnMouseUp é responsável pelo desenho dos moveplates. @@ -199,7 +208,7 @@ public void LineMovePlate(int xIncrement, int yIncrement) } if(sc.PositionOnBoard(x,y) && sc.GetPosition(x,y).GetComponent().player != player){ - MovePlateAttackSpawn(x,y); + MovePlateSpawn(x,y, attack: true); } } @@ -207,21 +216,32 @@ public void LineMovePlate(int xIncrement, int yIncrement) public void PawnMovePlate(int x, int y) { Game sc = controller.GetComponent(); + bool promote = false; + if (sc.PositionOnBoard(x, y)) { if (sc.GetPosition(x, y) == null) { - MovePlateSpawn(x, y); + if (y == 7 || y == 0) + promote = true; + + MovePlateSpawn(x, y, promote: promote); } if (sc.PositionOnBoard(x + 1, y) && sc.GetPosition(x + 1, y) != null && sc.GetPosition(x + 1, y).GetComponent().player != player) { - MovePlateAttackSpawn(x + 1, y); + if (y == 7 || y == 0) + promote = true; + + MovePlateSpawn(x + 1, y, attack: true, promote: promote); } if (sc.PositionOnBoard(x - 1, y) && sc.GetPosition(x - 1, y) != null && sc.GetPosition(x - 1, y).GetComponent().player != player) { - MovePlateAttackSpawn(x - 1, y); + if (y == 7 || y == 0) + promote = true; + + MovePlateSpawn(x - 1, y, attack: true, promote: promote); } } } @@ -273,13 +293,14 @@ a MovePlate de ataque na posição. } else if (chessPiece.GetComponent().player != player) { - MovePlateAttackSpawn(x, y); + MovePlateSpawn(x, y, attack: true); } } } - // Desenha os moveplates de acordo com uma matrix 8x8 - public void MovePlateSpawn(int matrixX, int matrixY) + // Desenha os moveplates de acordo com uma matrix 8x8, caso seja uma ação de ataque xor promoção de peão + // passe os respectivos atributos como true + public void MovePlateSpawn(int matrixX, int matrixY, bool attack = false, bool promote = false) { // Recupera o valor do tabuleiro para converter em xy coordenadas float x = matrixX; @@ -297,30 +318,9 @@ public void MovePlateSpawn(int matrixX, int matrixY) // Cria uma instância do moveplate e interage com essa instância. MovePlate mpScript = mp.GetComponent(); - mpScript.SetReference(gameObject); - mpScript.SetCoordinates(matrixX, matrixY); - } - - // Desenha os moveplates de acordo com uma matrix 8x8 trocando a flag de ataque para true. - public void MovePlateAttackSpawn(int matrixX, int matrixY) - { - // Recupera o valor do tabuleiro para converter em xy coordenadas - float x = matrixX; - float y = matrixY; - - // Ajuste do offset para ficar de acordo com uma matrix 8x8 - x *= 1.15f; - y *= 1.15f; - - x -= 4f; - y -= 3.6f; - - // Cria o gameobject do moveplate - GameObject mp = Instantiate(movePlate, new Vector3(x, y, -3.0f), Quaternion.identity); - - // Cria uma instância do moveplate e interage com essa instância, flag attack = true. - MovePlate mpScript = mp.GetComponent(); - mpScript.attack = true; + mpScript.promote = promote; + mpScript.attack = attack; + mpScript.SetReference(gameObject); mpScript.SetCoordinates(matrixX, matrixY); } diff --git a/chess-game-project/Assets/Scripts/Game.cs b/chess-game-project/Assets/Scripts/Game.cs index 1f94316..0d8bd16 100644 --- a/chess-game-project/Assets/Scripts/Game.cs +++ b/chess-game-project/Assets/Scripts/Game.cs @@ -1,5 +1,7 @@ +using System; using System.Collections; using System.Collections.Generic; +using System.Linq; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; @@ -11,6 +13,7 @@ public class Game : MonoBehaviour private GameObject[,] positions = new GameObject[8,8]; private GameObject[] whitePlayer = new GameObject[16]; private GameObject[] blackPlayer = new GameObject[16]; + private GameObject[] destroyedPieces = new GameObject[32]; private string currentPlayer = "white"; @@ -124,6 +127,12 @@ public void Update() } } + public void AppendDestroyedPieces(GameObject cp) + { + destroyedPieces = destroyedPieces.Append(cp) as GameObject[]; + Console.WriteLine(destroyedPieces); + } + public void Winner(string playerWinner) { gameOver = true; diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index 1d27f11..0c23ffb 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -1,3 +1,4 @@ +using System; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -8,12 +9,15 @@ public class MovePlate : MonoBehaviour GameObject reference = null; + public Sprite whiteQueen, blackQueen; + //Posições do tabuleiro int matrixX; int matrixY; // false: movimento, true: ataque public bool attack = false; + public bool promote = false; // Chamada quando o moveplate é criado public void Start() @@ -22,6 +26,17 @@ public void Start() { // A cor do sprite muda para vermelho gameObject.GetComponent().color = new Color(1.0f, 0.0f, 0.0f, 1.0f); + + if (promote) + { + // a cor da sprite muda para roxo + gameObject.GetComponent().color = new Color(0.6f, 0.2f, 0.6f, 1.0f); + } + } + else if (promote) + { + // A cor da sprite muda para azul + gameObject.GetComponent().color = new Color(0.0f, 0.0f, 1.0f, 1.0f); } } @@ -40,7 +55,9 @@ public void OnMouseUp() if (cp.name == "whiteKing") controller.GetComponent().Winner("preto"); if (cp.name == "blackKing") controller.GetComponent().Winner("branco"); - + + //controller.GetComponent().AppendDestroyedPieces(cp); + //TODO move to side Destroy(cp); } @@ -50,9 +67,22 @@ public void OnMouseUp() reference.GetComponent().SetXBoard(matrixX); reference.GetComponent().SetYBoard(matrixY); reference.GetComponent().SetCoordinates(); - controller.GetComponent().SetPosition(reference); - + + if (promote) + { + GameObject cp = controller.GetComponent().GetPosition(matrixX, matrixY); + if (matrixY == 7) + { + cp.name = "whiteQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteQueen(); + } + else + { + cp.name = "blackQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackQueen(); + } + } //Alterna o jogador atual controller.GetComponent().NextTurn(); diff --git a/chess-game-project/UserSettings/EditorUserSettings.asset b/chess-game-project/UserSettings/EditorUserSettings.asset index 42080f5..cf95208 100644 --- a/chess-game-project/UserSettings/EditorUserSettings.asset +++ b/chess-game-project/UserSettings/EditorUserSettings.asset @@ -12,10 +12,10 @@ EditorUserSettings: value: 025351575006085e5f5d5e7a16750744104e1e7b2f717360742d4830bab7636b flags: 0 RecentlyUsedSceneGuid-2: - value: 00550000560d5c5f0e585d7042710a444e4f1b7c2e707365782c4c62e4b2303c + value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 flags: 0 RecentlyUsedSceneGuid-3: - value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 + value: 00550000560d5c5f0e585d7042710a444e4f1b7c2e707365782c4c62e4b2303c flags: 0 vcSharedLogLevel: value: 0d5e400f0650 diff --git a/chess-game-project/UserSettings/Layouts/default-2021.dwlt b/chess-game-project/UserSettings/Layouts/default-2021.dwlt index e17c28d..f69f151 100644 --- a/chess-game-project/UserSettings/Layouts/default-2021.dwlt +++ b/chess-game-project/UserSettings/Layouts/default-2021.dwlt @@ -8,22 +8,22 @@ MonoBehaviour: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 - m_EditorHideFlags: 1 + m_EditorHideFlags: 0 m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} m_Name: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 0 - y: 43 - width: 1920 - height: 1037 + x: 72 + y: 144 + width: 1368 + height: 811 m_ShowMode: 4 - m_Title: Hierarchy + m_Title: Game m_RootView: {fileID: 6} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} - m_Maximized: 1 + m_Maximized: 0 --- !u!114 &2 MonoBehaviour: m_ObjectHideFlags: 52 @@ -43,12 +43,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 30 - width: 1920 - height: 987 + width: 1368 + height: 761 m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 85 + controlID: 96 --- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 @@ -64,10 +64,10 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 1466 + x: 1045 y: 0 - width: 454 - height: 987 + width: 323 + height: 761 m_MinSize: {x: 276, y: 71} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 14} @@ -92,8 +92,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 362 - height: 584 + width: 258 + height: 448 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 15} @@ -117,9 +117,9 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 584 - width: 1466 - height: 403 + y: 448 + width: 1045 + height: 313 m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} m_ActualView: {fileID: 13} @@ -148,8 +148,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1920 - height: 1037 + width: 1368 + height: 811 m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 @@ -173,7 +173,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1920 + width: 1368 height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -194,8 +194,8 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 1017 - width: 1920 + y: 791 + width: 1368 height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -218,12 +218,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1466 - height: 987 + width: 1045 + height: 761 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 86 + controlID: 97 --- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 @@ -243,12 +243,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1466 - height: 584 + width: 1045 + height: 448 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 87 + controlID: 98 --- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 @@ -259,24 +259,24 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: SceneView + m_Name: GameView m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 - x: 362 + x: 258 y: 0 - width: 1104 - height: 584 + width: 787 + height: 448 m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} - m_ActualView: {fileID: 16} + m_ActualView: {fileID: 17} m_Panes: - {fileID: 16} - {fileID: 17} - {fileID: 12} - m_Selected: 0 - m_LastSelected: 1 + m_Selected: 1 + m_LastSelected: 0 --- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 @@ -312,7 +312,7 @@ MonoBehaviour: m_CachedPref: 409 m_ControlHash: 1412526313 m_PrefName: Preview_InspectorPreview - m_LastInspectedObjectInstanceID: 24086 + m_LastInspectedObjectInstanceID: 24542 m_LastVerticalScrollValue: 0 m_GlobalObjectId: m_InspectorMode: 0 @@ -339,10 +339,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 0 - y: 657 - width: 1465 - height: 382 + x: 72 + y: 647 + width: 1044 + height: 292 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -361,22 +361,22 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/Assets/Sprites/Boards/Bases + - Assets/Assets/Sprites/Tiles m_Globs: [] m_OriginalText: m_ViewMode: 1 m_StartGridSize: 64 m_LastFolders: - - Assets/Assets/Sprites/Boards/Bases + - Assets/Assets/Sprites/Tiles m_LastFoldersGridSize: -1 - m_LastProjectPath: C:\Users\johan\Documents\GitHub\chessGame\chess-game-project + m_LastProjectPath: /home/igor/Documentos/UFF/Graduacao/7_periodo/ES2/chessGame/chess-game-project m_LockTracker: m_IsLocked: 0 m_FolderTreeState: - scrollPos: {x: 0, y: 42} - m_SelectedIDs: 705f0000 - m_LastClickedID: 24432 - m_ExpandedIDs: 00000000465f0000485f00004a5f00004c5f00004e5f0000505f0000525f0000545f0000565f0000585f000000ca9a3b + scrollPos: {x: 0, y: 0} + m_SelectedIDs: de5f0000 + m_LastClickedID: 24542 + m_ExpandedIDs: 00000000b85f0000bc5f0000d05f000000ca9a3b m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -404,7 +404,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000465f0000485f00004a5f00004c5f00004e5f0000505f0000525f0000545f0000565f0000585f0000 + m_ExpandedIDs: 00000000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -431,7 +431,7 @@ MonoBehaviour: m_ListAreaState: m_SelectedInstanceIDs: m_LastClickedInstanceID: 0 - m_HadKeyboardFocusLastEvent: 1 + m_HadKeyboardFocusLastEvent: 0 m_ExpandedInstanceIDs: c62300005e6c0000f86a0000f4680000e6650000 m_RenameOverlay: m_UserAcceptedRename: 0 @@ -480,10 +480,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1466 - y: 73 - width: 453 - height: 966 + x: 1117 + y: 199 + width: 322 + height: 740 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -522,10 +522,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 0 - y: 73 - width: 361 - height: 563 + x: 72 + y: 199 + width: 257 + height: 427 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -534,9 +534,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: + m_SelectedIDs: de5f0000 m_LastClickedID: 0 - m_ExpandedIDs: 1cfaffff1afbffff165e0000 + m_ExpandedIDs: 0cfbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -580,10 +580,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 362 - y: 73 - width: 1102 - height: 563 + x: 1802 + y: 92 + width: 1103 + height: 550 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -841,9 +841,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: -1.1223259, y: 54.595444, z: -133.27225} + m_Target: {x: 0.8157873, y: -0.016838798, z: -0.085324034} speed: 2 - m_Value: {x: -1.1223259, y: 54.595444, z: -133.27225} + m_Value: {x: 0.8157873, y: -0.016838798, z: -0.085324034} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -894,9 +894,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 25.475115 + m_Target: 5.977448 speed: 2 - m_Value: 25.475115 + m_Value: 5.977448 m_Ortho: m_Target: 1 speed: 2 @@ -941,10 +941,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 362 - y: 73 - width: 1102 - height: 563 + x: 330 + y: 199 + width: 785 + height: 427 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -992,23 +992,23 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 1102 - height: 542 - m_Scale: {x: 0.50185186, y: 0.50185186} - m_Translation: {x: 551, y: 271} + width: 785 + height: 406 + m_Scale: {x: 0.37592593, y: 0.37592593} + m_Translation: {x: 392.5, y: 203} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -1097.9336 + x: -1044.0886 y: -540 - width: 2195.8672 + width: 2088.1772 height: 1080 m_MinimalGUI: 1 - m_defaultScale: 0.50185186 - m_LastWindowPixelSize: {x: 1102, y: 563} + m_defaultScale: 0.37592593 + m_LastWindowPixelSize: {x: 785, y: 427} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 From fd681bb684d6b43e2c94fe38f948552f309c4bee Mon Sep 17 00:00:00 2001 From: Igor Monardez Date: Thu, 25 May 2023 13:39:15 -0300 Subject: [PATCH 02/13] =?UTF-8?q?CG-181=20por=20Igor=20Mon=C3=A1rdez:=20L?= =?UTF-8?q?=C3=B3gica=20para=20botar=20as=20pe=C3=A7as=20comidas=20ao=20la?= =?UTF-8?q?do=20do=20tabuleiro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess-game-project/Assets/Scripts/Chessman.cs | 5 ++ chess-game-project/Assets/Scripts/Game.cs | 57 +++++++++++++++++-- .../Assets/Scripts/MovePlate.cs | 18 +++--- 3 files changed, 66 insertions(+), 14 deletions(-) diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index 468fba5..ace066f 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -95,6 +95,11 @@ public void SetYBoard(int y) yBoard = y; } + public string GetPlayer() + { + return this.player; + } + public Sprite GetWhiteQueen() { return whiteQueen; diff --git a/chess-game-project/Assets/Scripts/Game.cs b/chess-game-project/Assets/Scripts/Game.cs index 0d8bd16..bfec095 100644 --- a/chess-game-project/Assets/Scripts/Game.cs +++ b/chess-game-project/Assets/Scripts/Game.cs @@ -13,7 +13,7 @@ public class Game : MonoBehaviour private GameObject[,] positions = new GameObject[8,8]; private GameObject[] whitePlayer = new GameObject[16]; private GameObject[] blackPlayer = new GameObject[16]; - private GameObject[] destroyedPieces = new GameObject[32]; + private GameObject[,] destroyedPieces; private string currentPlayer = "white"; @@ -42,6 +42,8 @@ public void Start() Create("blackBishop", 5, 7), Create("blackKnight", 6, 7), Create("blackTower", 7, 7) }; + this.destroyedPieces = new GameObject[4,8]; + // Coloca as peças no tabuleiro for (int i = 0; i < whitePlayer.Length; i++) { @@ -74,18 +76,23 @@ public void SetPosition(GameObject obj) positions[chessman.GetXBoard(), chessman.GetYBoard()] = obj; } - + public GameObject GetPosition(int x, int y) { return positions[x, y]; } // Função de define que uma posição (x, y) fique vazia. - public void SetPositionEmpty(int x, int y) + public void SetPositionEmpty(int x, int y) { positions[x, y] = null; } + public void SerPositionSpriteEmpty(int x, int y) + { + positions[x, y].GetComponent().sprite = null; + } + // Função verifica se dado um valor (x, y), esse par está dentro do tabuleiro 8x8. public bool PositionOnBoard(int x, int y) @@ -129,8 +136,48 @@ public void Update() public void AppendDestroyedPieces(GameObject cp) { - destroyedPieces = destroyedPieces.Append(cp) as GameObject[]; - Console.WriteLine(destroyedPieces); + if (cp.GetComponent().GetPlayer() == "white") + { + for (int i = 1; i >= 0 ; i--) + { + for (int j = 0; j < 8; j++) + { + if (destroyedPieces[i, j] == null) + { + destroyedPieces[i, j] = cp; + return; + } + } + } + } + else + { + for (int i = 2; i < 4; i++) + { + for (int j = 0; j < 8; j++) + { + if (destroyedPieces[i, j] == null) + { + destroyedPieces[i, j] = cp; + return; + } + } + } + } + } + + public (int i, int j) SearchDestroyedPieces(GameObject cp) + { + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 8; j++) + { + if (destroyedPieces[i, j] == cp) + return (i, j); + } + } + + return (-1, -1); } public void Winner(string playerWinner) diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index 0c23ffb..b0dae60 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -9,7 +9,6 @@ public class MovePlate : MonoBehaviour GameObject reference = null; - public Sprite whiteQueen, blackQueen; //Posições do tabuleiro int matrixX; @@ -33,11 +32,6 @@ public void Start() gameObject.GetComponent().color = new Color(0.6f, 0.2f, 0.6f, 1.0f); } } - else if (promote) - { - // A cor da sprite muda para azul - gameObject.GetComponent().color = new Color(0.0f, 0.0f, 1.0f, 1.0f); - } } /* @@ -51,17 +45,23 @@ public void OnMouseUp() if(attack) { + int i, j; GameObject cp = controller.GetComponent().GetPosition(matrixX,matrixY); if (cp.name == "whiteKing") controller.GetComponent().Winner("preto"); if (cp.name == "blackKing") controller.GetComponent().Winner("branco"); - //controller.GetComponent().AppendDestroyedPieces(cp); + controller.GetComponent().AppendDestroyedPieces(cp); + (i,j) = controller.GetComponent().SearchDestroyedPieces(cp); + if (cp.GetComponent().GetPlayer() == "black") + controller.GetComponent().Create(cp.name, i + 6, j); + else + controller.GetComponent().Create(cp.name, i - 3, j); + controller.GetComponent().SerPositionSpriteEmpty(matrixX, matrixY); + controller.GetComponent().SetPositionEmpty(matrixX, matrixY); //TODO move to side - Destroy(cp); } - controller.GetComponent().SetPositionEmpty(reference.GetComponent().GetXBoard(), reference.GetComponent().GetYBoard()); reference.GetComponent().SetXBoard(matrixX); From 0869e5a78f6079279cb9d3495406edaf275f8ccc Mon Sep 17 00:00:00 2001 From: Igor Monardez Date: Wed, 24 May 2023 14:53:13 -0300 Subject: [PATCH 03/13] =?UTF-8?q?CG-181=20por=20Igor=20Mon=C3=A1rdez:=20Pr?= =?UTF-8?q?omo=C3=A7=C3=A3o=20de=20pe=C3=A3o=20para=20rainha=20apenas=20e?= =?UTF-8?q?=20come=C3=A7o=20da=20retirada=20de=20pe=C3=A7as=20para=20o=20l?= =?UTF-8?q?ado=20do=20tabuleiro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess-game-project/Assets/Scripts/Chessman.cs | 57 +++++++++---------- chess-game-project/Assets/Scripts/Game.cs | 9 +++ .../Assets/Scripts/MovePlate.cs | 36 +++++++++++- 3 files changed, 69 insertions(+), 33 deletions(-) diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index ae41352..e3d738b 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -132,6 +132,15 @@ public void SetYBoard(int y) yBoard = y; } + public Sprite GetWhiteQueen() + { + return whiteQueen[setID]; + } + public Sprite GetBlackQueen() + { + return blackQueen[setID]; + } + /* Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. Nesse caso, essa OnMouseUp é responsável pelo desenho dos moveplates. @@ -236,7 +245,7 @@ public void LineMovePlate(int xIncrement, int yIncrement) } if(sc.PositionOnBoard(x,y) && sc.GetPosition(x,y).GetComponent().player != player){ - MovePlateAttackSpawn(x,y); + MovePlateSpawn(x,y, attack: true); } } @@ -244,6 +253,8 @@ public void LineMovePlate(int xIncrement, int yIncrement) public void PawnMovePlate(int x, int y) { Game sc = controller.GetComponent(); + bool promote = false; + if (sc.PositionOnBoard(x, y)) { // Se for a posição inicial do peão, spawnar dois movePlate @@ -273,12 +284,18 @@ public void PawnMovePlate(int x, int y) if (sc.PositionOnBoard(x + 1, y) && sc.GetPosition(x + 1, y) != null && sc.GetPosition(x + 1, y).GetComponent().player != player) { - MovePlateAttackSpawn(x + 1, y); + if (y == 7 || y == 0) + promote = true; + + MovePlateSpawn(x + 1, y, attack: true, promote: promote); } if (sc.PositionOnBoard(x - 1, y) && sc.GetPosition(x - 1, y) != null && sc.GetPosition(x - 1, y).GetComponent().player != player) { - MovePlateAttackSpawn(x - 1, y); + if (y == 7 || y == 0) + promote = true; + + MovePlateSpawn(x - 1, y, attack: true, promote: promote); } } } @@ -330,13 +347,14 @@ a MovePlate de ataque na posição. } else if (chessPiece.GetComponent().player != player) { - MovePlateAttackSpawn(x, y); + MovePlateSpawn(x, y, attack: true); } } } - // Desenha os moveplates de acordo com uma matrix 8x8 - public void MovePlateSpawn(int matrixX, int matrixY) + // Desenha os moveplates de acordo com uma matrix 8x8, caso seja uma ação de ataque xor promoção de peão + // passe os respectivos atributos como true + public void MovePlateSpawn(int matrixX, int matrixY, bool attack = false, bool promote = false) { // Recupera o valor do tabuleiro para converter em xy coordenadas float x = matrixX; @@ -354,30 +372,9 @@ public void MovePlateSpawn(int matrixX, int matrixY) // Cria uma instância do moveplate e interage com essa instância. MovePlate mpScript = mp.GetComponent(); - mpScript.SetReference(gameObject); - mpScript.SetCoordinates(matrixX, matrixY); - } - - // Desenha os moveplates de acordo com uma matrix 8x8 trocando a flag de ataque para true. - public void MovePlateAttackSpawn(int matrixX, int matrixY) - { - // Recupera o valor do tabuleiro para converter em xy coordenadas - float x = matrixX; - float y = matrixY; - - // Ajuste do offset para ficar de acordo com uma matrix 8x8 - x *= 0.95f; - y *= 0.95f; - - x -= 3.32f; - y -= 2.99f; - - // Cria o gameobject do moveplate - GameObject mp = Instantiate(movePlate, new Vector3(x, y, -3.0f), Quaternion.identity); - - // Cria uma instância do moveplate e interage com essa instância, flag attack = true. - MovePlate mpScript = mp.GetComponent(); - mpScript.attack = true; + mpScript.promote = promote; + mpScript.attack = attack; + mpScript.SetReference(gameObject); mpScript.SetCoordinates(matrixX, matrixY); } diff --git a/chess-game-project/Assets/Scripts/Game.cs b/chess-game-project/Assets/Scripts/Game.cs index 1f94316..0d8bd16 100644 --- a/chess-game-project/Assets/Scripts/Game.cs +++ b/chess-game-project/Assets/Scripts/Game.cs @@ -1,5 +1,7 @@ +using System; using System.Collections; using System.Collections.Generic; +using System.Linq; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; @@ -11,6 +13,7 @@ public class Game : MonoBehaviour private GameObject[,] positions = new GameObject[8,8]; private GameObject[] whitePlayer = new GameObject[16]; private GameObject[] blackPlayer = new GameObject[16]; + private GameObject[] destroyedPieces = new GameObject[32]; private string currentPlayer = "white"; @@ -124,6 +127,12 @@ public void Update() } } + public void AppendDestroyedPieces(GameObject cp) + { + destroyedPieces = destroyedPieces.Append(cp) as GameObject[]; + Console.WriteLine(destroyedPieces); + } + public void Winner(string playerWinner) { gameOver = true; diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index 1d27f11..0c23ffb 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -1,3 +1,4 @@ +using System; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -8,12 +9,15 @@ public class MovePlate : MonoBehaviour GameObject reference = null; + public Sprite whiteQueen, blackQueen; + //Posições do tabuleiro int matrixX; int matrixY; // false: movimento, true: ataque public bool attack = false; + public bool promote = false; // Chamada quando o moveplate é criado public void Start() @@ -22,6 +26,17 @@ public void Start() { // A cor do sprite muda para vermelho gameObject.GetComponent().color = new Color(1.0f, 0.0f, 0.0f, 1.0f); + + if (promote) + { + // a cor da sprite muda para roxo + gameObject.GetComponent().color = new Color(0.6f, 0.2f, 0.6f, 1.0f); + } + } + else if (promote) + { + // A cor da sprite muda para azul + gameObject.GetComponent().color = new Color(0.0f, 0.0f, 1.0f, 1.0f); } } @@ -40,7 +55,9 @@ public void OnMouseUp() if (cp.name == "whiteKing") controller.GetComponent().Winner("preto"); if (cp.name == "blackKing") controller.GetComponent().Winner("branco"); - + + //controller.GetComponent().AppendDestroyedPieces(cp); + //TODO move to side Destroy(cp); } @@ -50,9 +67,22 @@ public void OnMouseUp() reference.GetComponent().SetXBoard(matrixX); reference.GetComponent().SetYBoard(matrixY); reference.GetComponent().SetCoordinates(); - controller.GetComponent().SetPosition(reference); - + + if (promote) + { + GameObject cp = controller.GetComponent().GetPosition(matrixX, matrixY); + if (matrixY == 7) + { + cp.name = "whiteQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteQueen(); + } + else + { + cp.name = "blackQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackQueen(); + } + } //Alterna o jogador atual controller.GetComponent().NextTurn(); From 551eff6bb2671d5fd703d45626d002b5aea32c15 Mon Sep 17 00:00:00 2001 From: Igor Monardez Date: Thu, 25 May 2023 13:39:15 -0300 Subject: [PATCH 04/13] =?UTF-8?q?CG-181=20por=20Igor=20Mon=C3=A1rdez:=20L?= =?UTF-8?q?=C3=B3gica=20para=20botar=20as=20pe=C3=A7as=20comidas=20ao=20la?= =?UTF-8?q?do=20do=20tabuleiro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess-game-project/Assets/Scripts/Chessman.cs | 5 ++ chess-game-project/Assets/Scripts/Game.cs | 57 +++++++++++++++++-- .../Assets/Scripts/MovePlate.cs | 18 +++--- 3 files changed, 66 insertions(+), 14 deletions(-) diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index e3d738b..e672ca1 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -132,6 +132,11 @@ public void SetYBoard(int y) yBoard = y; } + public string GetPlayer() + { + return this.player; + } + public Sprite GetWhiteQueen() { return whiteQueen[setID]; diff --git a/chess-game-project/Assets/Scripts/Game.cs b/chess-game-project/Assets/Scripts/Game.cs index 0d8bd16..bfec095 100644 --- a/chess-game-project/Assets/Scripts/Game.cs +++ b/chess-game-project/Assets/Scripts/Game.cs @@ -13,7 +13,7 @@ public class Game : MonoBehaviour private GameObject[,] positions = new GameObject[8,8]; private GameObject[] whitePlayer = new GameObject[16]; private GameObject[] blackPlayer = new GameObject[16]; - private GameObject[] destroyedPieces = new GameObject[32]; + private GameObject[,] destroyedPieces; private string currentPlayer = "white"; @@ -42,6 +42,8 @@ public void Start() Create("blackBishop", 5, 7), Create("blackKnight", 6, 7), Create("blackTower", 7, 7) }; + this.destroyedPieces = new GameObject[4,8]; + // Coloca as peças no tabuleiro for (int i = 0; i < whitePlayer.Length; i++) { @@ -74,18 +76,23 @@ public void SetPosition(GameObject obj) positions[chessman.GetXBoard(), chessman.GetYBoard()] = obj; } - + public GameObject GetPosition(int x, int y) { return positions[x, y]; } // Função de define que uma posição (x, y) fique vazia. - public void SetPositionEmpty(int x, int y) + public void SetPositionEmpty(int x, int y) { positions[x, y] = null; } + public void SerPositionSpriteEmpty(int x, int y) + { + positions[x, y].GetComponent().sprite = null; + } + // Função verifica se dado um valor (x, y), esse par está dentro do tabuleiro 8x8. public bool PositionOnBoard(int x, int y) @@ -129,8 +136,48 @@ public void Update() public void AppendDestroyedPieces(GameObject cp) { - destroyedPieces = destroyedPieces.Append(cp) as GameObject[]; - Console.WriteLine(destroyedPieces); + if (cp.GetComponent().GetPlayer() == "white") + { + for (int i = 1; i >= 0 ; i--) + { + for (int j = 0; j < 8; j++) + { + if (destroyedPieces[i, j] == null) + { + destroyedPieces[i, j] = cp; + return; + } + } + } + } + else + { + for (int i = 2; i < 4; i++) + { + for (int j = 0; j < 8; j++) + { + if (destroyedPieces[i, j] == null) + { + destroyedPieces[i, j] = cp; + return; + } + } + } + } + } + + public (int i, int j) SearchDestroyedPieces(GameObject cp) + { + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 8; j++) + { + if (destroyedPieces[i, j] == cp) + return (i, j); + } + } + + return (-1, -1); } public void Winner(string playerWinner) diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index 0c23ffb..b0dae60 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -9,7 +9,6 @@ public class MovePlate : MonoBehaviour GameObject reference = null; - public Sprite whiteQueen, blackQueen; //Posições do tabuleiro int matrixX; @@ -33,11 +32,6 @@ public void Start() gameObject.GetComponent().color = new Color(0.6f, 0.2f, 0.6f, 1.0f); } } - else if (promote) - { - // A cor da sprite muda para azul - gameObject.GetComponent().color = new Color(0.0f, 0.0f, 1.0f, 1.0f); - } } /* @@ -51,17 +45,23 @@ public void OnMouseUp() if(attack) { + int i, j; GameObject cp = controller.GetComponent().GetPosition(matrixX,matrixY); if (cp.name == "whiteKing") controller.GetComponent().Winner("preto"); if (cp.name == "blackKing") controller.GetComponent().Winner("branco"); - //controller.GetComponent().AppendDestroyedPieces(cp); + controller.GetComponent().AppendDestroyedPieces(cp); + (i,j) = controller.GetComponent().SearchDestroyedPieces(cp); + if (cp.GetComponent().GetPlayer() == "black") + controller.GetComponent().Create(cp.name, i + 6, j); + else + controller.GetComponent().Create(cp.name, i - 3, j); + controller.GetComponent().SerPositionSpriteEmpty(matrixX, matrixY); + controller.GetComponent().SetPositionEmpty(matrixX, matrixY); //TODO move to side - Destroy(cp); } - controller.GetComponent().SetPositionEmpty(reference.GetComponent().GetXBoard(), reference.GetComponent().GetYBoard()); reference.GetComponent().SetXBoard(matrixX); From 6dfd637b54bd2d9c7a94dbbcb21aa22d95d6e828 Mon Sep 17 00:00:00 2001 From: Igor Monardez Date: Fri, 26 May 2023 09:39:00 -0300 Subject: [PATCH 05/13] =?UTF-8?q?CG-181=20por=20Igor=20Mon=C3=A1rdez:=20Co?= =?UTF-8?q?rre=C3=A7=C3=A3o=20da=20logica=20de=20spawn=20do=20moveplate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess-game-project/Assets/Scripts/Chessman.cs | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index e672ca1..87d4c08 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -279,17 +279,30 @@ public void PawnMovePlate(int x, int y) MovePlateSpawn(x, y - 1); } } - else + else if (sc.GetCurrentPlayer() == "white") { if (sc.GetPosition(x, y) == null) { - MovePlateSpawn(x, y); + if (y == 7) + promote = true; + MovePlateSpawn(x, y, promote: promote); } } - + else if (sc.GetCurrentPlayer() == "black") + { + if (sc.GetPosition(x, y) == null) + { + if (y == 7) + promote = true; + MovePlateSpawn(x, y, promote: promote); + } + } + if (sc.PositionOnBoard(x + 1, y) && sc.GetPosition(x + 1, y) != null && sc.GetPosition(x + 1, y).GetComponent().player != player) { - if (y == 7 || y == 0) + if (y == 7 && sc.GetCurrentPlayer() == "white") + promote = true; + else if (y == 0 && sc.GetCurrentPlayer() == "black") promote = true; MovePlateSpawn(x + 1, y, attack: true, promote: promote); @@ -297,7 +310,9 @@ public void PawnMovePlate(int x, int y) if (sc.PositionOnBoard(x - 1, y) && sc.GetPosition(x - 1, y) != null && sc.GetPosition(x - 1, y).GetComponent().player != player) { - if (y == 7 || y == 0) + if (y == 7 && sc.GetCurrentPlayer() == "white") + promote = true; + else if (y == 0 && sc.GetCurrentPlayer() == "black") promote = true; MovePlateSpawn(x - 1, y, attack: true, promote: promote); From 0a4f0166b72eb062d1b8afc2ae64dc09c8b578a0 Mon Sep 17 00:00:00 2001 From: Igor Monardez Date: Mon, 29 May 2023 14:19:18 -0300 Subject: [PATCH 06/13] =?UTF-8?q?CG-181=20por=20Igor=20Mon=C3=A1rdez:=20co?= =?UTF-8?q?rre=C3=A7=C3=A3o=20da=20promo=C3=A7=C3=A3o=20do=20pe=C3=A3o=20p?= =?UTF-8?q?reto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chess-game-project/Assets/Scripts/Chessman.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index 87d4c08..a6fb01b 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -292,7 +292,7 @@ public void PawnMovePlate(int x, int y) { if (sc.GetPosition(x, y) == null) { - if (y == 7) + if (y == 0) promote = true; MovePlateSpawn(x, y, promote: promote); } From 08029f5eae08d06a32ceb0f19220a34fd6a8b89a Mon Sep 17 00:00:00 2001 From: Johann Daflon Date: Thu, 15 Jun 2023 19:22:21 -0300 Subject: [PATCH 07/13] Promotion Menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Menu de promoção, feito com diálogos do unity. --- chess-game-project/Assets/Scenes/Game.unity | 1252 ++++++++++++++++- chess-game-project/Assets/Scripts/Chessman.cs | 31 + .../Assets/Scripts/MovePlate.cs | 102 +- .../Assets/Scripts/PromotionMenu.cs | 49 + .../Assets/Scripts/PromotionMenu.cs.meta | 11 + .../UserSettings/EditorUserSettings.asset | 4 +- .../Layouts/CurrentMaximizeLayout.dwlt | 199 ++- .../UserSettings/Layouts/default-2021.dwlt | 251 ++-- 8 files changed, 1583 insertions(+), 316 deletions(-) create mode 100644 chess-game-project/Assets/Scripts/PromotionMenu.cs create mode 100644 chess-game-project/Assets/Scripts/PromotionMenu.cs.meta diff --git a/chess-game-project/Assets/Scenes/Game.unity b/chess-game-project/Assets/Scenes/Game.unity index 231219d..2359c73 100644 --- a/chess-game-project/Assets/Scenes/Game.unity +++ b/chess-game-project/Assets/Scenes/Game.unity @@ -123,6 +123,282 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &28844586 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 28844588} + m_Layer: 0 + m_Name: PromotionMenu + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &28844588 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 28844586} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -0.3} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1203982100} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &134692005 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 134692006} + - component: {fileID: 134692009} + - component: {fileID: 134692008} + - component: {fileID: 134692007} + m_Layer: 5 + m_Name: CavaloBtn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &134692006 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 134692005} + 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: + - {fileID: 1223618273} + m_Father: {fileID: 1203982100} + m_RootOrder: 2 + 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: 299, y: 144} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &134692007 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 134692005} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 134692008} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &134692008 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 134692005} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &134692009 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 134692005} + m_CullTransparentMesh: 1 +--- !u!1 &407499589 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 407499590} + - component: {fileID: 407499593} + - component: {fileID: 407499592} + - component: {fileID: 407499591} + m_Layer: 5 + m_Name: BispoBtn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &407499590 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 407499589} + 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: + - {fileID: 598793263} + m_Father: {fileID: 1203982100} + m_RootOrder: 3 + 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: 299, y: 114} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &407499591 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 407499589} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 407499592} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &407499592 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 407499589} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &407499593 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 407499589} + m_CullTransparentMesh: 1 --- !u!1 &519420028 GameObject: m_ObjectHideFlags: 0 @@ -287,6 +563,276 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 584682953} m_CullTransparentMesh: 1 +--- !u!1 &598793262 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 598793263} + - component: {fileID: 598793265} + - component: {fileID: 598793264} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &598793263 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 598793262} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 90} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 407499590} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &598793264 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 598793262} + m_Enabled: 1 + 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: Bispo + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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 &598793265 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 598793262} + m_CullTransparentMesh: 1 +--- !u!1 &770949159 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 770949160} + - component: {fileID: 770949162} + - component: {fileID: 770949161} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &770949160 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770949159} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 90} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2054675720} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &770949161 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770949159} + m_Enabled: 1 + 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: Torre + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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 &770949162 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770949159} + m_CullTransparentMesh: 1 --- !u!1 &848132681 GameObject: m_ObjectHideFlags: 0 @@ -356,62 +902,301 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085988842} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1261937589} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.23952085, y: 0.6254073} - m_AnchorMax: {x: 0.76100004, y: 0.95000005} - m_AnchoredPosition: {x: 0.1800232, y: 1.3099976} - m_SizeDelta: {x: -4.730011, y: -5.1900024} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1085988844 + m_GameObject: {fileID: 1085988842} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 2} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1261937589} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.23952085, y: 0.6254073} + m_AnchorMax: {x: 0.76100004, y: 0.95000005} + m_AnchoredPosition: {x: 0.1800232, y: 1.3099976} + m_SizeDelta: {x: -4.730011, y: -5.1900024} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1085988844 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085988842} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 80 + m_FontStyle: 3 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 80 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Game Over, aperte para sair. +--- !u!222 &1085988845 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085988842} + m_CullTransparentMesh: 1 +--- !u!1 &1171371335 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1171371336} + - component: {fileID: 1171371338} + - component: {fileID: 1171371337} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1171371336 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1171371335} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 90} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1946311501} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1171371337 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1171371335} + m_Enabled: 1 + 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: Rainha + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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 &1171371338 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1171371335} + m_CullTransparentMesh: 1 +--- !u!1 &1203982099 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1203982100} + - component: {fileID: 1203982103} + - component: {fileID: 1203982102} + - component: {fileID: 1203982101} + m_Layer: 5 + m_Name: CanvaMenu + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1203982100 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1203982099} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -2.6} + m_LocalScale: {x: 0.01831502, y: 0.01831502, z: 0.01831502} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1946311501} + - {fileID: 2054675720} + - {fileID: 134692006} + - {fileID: 407499590} + m_Father: {fileID: 28844588} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 1104, y: 546} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1203982101 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1203982099} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1203982102 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085988842} - m_Enabled: 0 + m_GameObject: {fileID: 1203982099} + m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, 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_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 80 - m_FontStyle: 3 - m_BestFit: 0 - m_MinSize: 4 - m_MaxSize: 80 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Game Over, aperte para sair. ---- !u!222 &1085988845 -CanvasRenderer: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 1 +--- !u!223 &1203982103 +Canvas: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085988842} - m_CullTransparentMesh: 1 + m_GameObject: {fileID: 1203982099} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 519420031} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 25 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 --- !u!1 &1206968598 GameObject: m_ObjectHideFlags: 0 @@ -523,6 +1308,141 @@ MonoBehaviour: - {fileID: 21300000, guid: 2e95eda1ff934164db5526ecabd5da7a, type: 3} - {fileID: 21300000, guid: 044d6e38a893bff4c9444b5a4b0db091, type: 3} - {fileID: 21300000, guid: d0024b839053f92459d1bf3a6cbc2422, type: 3} +--- !u!1 &1223618272 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1223618273} + - component: {fileID: 1223618275} + - component: {fileID: 1223618274} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1223618273 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1223618272} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 90} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 134692006} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1223618274 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1223618272} + m_Enabled: 1 + 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: Cavalo + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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 &1223618275 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1223618272} + m_CullTransparentMesh: 1 --- !u!1 &1261937585 GameObject: m_ObjectHideFlags: 0 @@ -736,6 +1656,250 @@ MonoBehaviour: - {fileID: 21300000, guid: 6eed6028af9d489498528a165c16d3da, type: 3} - {fileID: 21300000, guid: b73bbb6d77d918e42b8c2747cd5e0072, type: 3} - {fileID: 21300000, guid: 8dc6ecd7b73c30b42a92a1b3def9b513, type: 3} +--- !u!1 &1946311500 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1946311501} + - component: {fileID: 1946311504} + - component: {fileID: 1946311503} + - component: {fileID: 1946311502} + m_Layer: 5 + m_Name: RainhaBtn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1946311501 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1946311500} + 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: + - {fileID: 1171371336} + m_Father: {fileID: 1203982100} + m_RootOrder: 0 + 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: 299, y: 204} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1946311502 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1946311500} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1946311503} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1946311503 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1946311500} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &1946311504 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1946311500} + m_CullTransparentMesh: 1 +--- !u!1 &2054675719 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2054675720} + - component: {fileID: 2054675723} + - component: {fileID: 2054675722} + - component: {fileID: 2054675721} + m_Layer: 5 + m_Name: TorreBtn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2054675720 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2054675719} + 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: + - {fileID: 770949160} + m_Father: {fileID: 1203982100} + m_RootOrder: 1 + 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: 299, y: 174} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2054675721 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2054675719} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2054675722} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &2054675722 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2054675719} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &2054675723 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2054675719} + m_CullTransparentMesh: 1 --- !u!1 &2106842907 GameObject: m_ObjectHideFlags: 0 diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index a6fb01b..7bfc614 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -141,10 +141,41 @@ public Sprite GetWhiteQueen() { return whiteQueen[setID]; } + + public Sprite GetWhiteTower() + { + return whiteTower[setID]; + } + + public Sprite GetWhiteBishop() + { + return whiteBishop[setID]; + } + + public Sprite GetWhiteKnight() + { + return whiteKnight[setID]; + } + public Sprite GetBlackQueen() { return blackQueen[setID]; } + + public Sprite GetBlackTower() + { + return blackTower[setID]; + } + + public Sprite GetBlackBishop() + { + return blackBishop[setID]; + } + + public Sprite GetBlackKnight() + { + return blackKnight[setID]; + } /* Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index b0dae60..02423c9 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEditor; public class MovePlate : MonoBehaviour { @@ -34,11 +35,57 @@ public void Start() } } - /* - Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. - Nesse caso, essa OnMouseUp é responsável pela troca de um moveplate com a peça - que está sofrendo a interação do usuário. - */ + public static PieceType ShowPromotionMenu() + { + PieceType selectedPiece = PieceType.Queen; + bool promote = true; + + if (promote) + { + bool queen = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Rainha", "Torre"); + if (queen) + { + selectedPiece = PieceType.Queen; + } + else + { + bool tower = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Torre", "Bispo"); + if (tower) + { + selectedPiece = PieceType.Tower; + } + else + { + bool bishop = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Bispo", "Cavalo"); + if (bishop) + { + selectedPiece = PieceType.Bishop; + } + else + { + selectedPiece = PieceType.Knight; + } + } + } + } + + return selectedPiece; + } + + + public enum PieceType + { + Queen, + Tower, + Bishop, + Knight + } + +/* + Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. + Nesse caso, essa OnMouseUp é responsável pela troca de um moveplate com a peça + que está sofrendo a interação do usuário. +*/ public void OnMouseUp() { controller = GameObject.FindGameObjectWithTag("GameController"); @@ -72,15 +119,52 @@ public void OnMouseUp() if (promote) { GameObject cp = controller.GetComponent().GetPosition(matrixX, matrixY); + PieceType promocao = ShowPromotionMenu(); if (matrixY == 7) { - cp.name = "whiteQueen"; - cp.GetComponent().sprite = reference.GetComponent().GetWhiteQueen(); + if(promocao == PieceType.Tower) + { + cp.name = "whiteTower"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteTower(); + } + if(promocao == PieceType.Queen) + { + cp.name = "whiteQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteQueen(); + } + if(promocao == PieceType.Bishop) + { + cp.name = "whiteBishop"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteBishop(); + } + if(promocao == PieceType.Knight) + { + cp.name = "whiteKnight"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteKnight(); + } } else { - cp.name = "blackQueen"; - cp.GetComponent().sprite = reference.GetComponent().GetBlackQueen(); + if (promocao == PieceType.Tower) + { + cp.name = "blackTower"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackTower(); + } + if (promocao == PieceType.Queen) + { + cp.name = "blackQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackQueen(); + } + if (promocao == PieceType.Bishop) + { + cp.name = "blackBishop"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackBishop(); + } + if (promocao == PieceType.Knight) + { + cp.name = "blackKnight"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackKnight(); + } } } //Alterna o jogador atual diff --git a/chess-game-project/Assets/Scripts/PromotionMenu.cs b/chess-game-project/Assets/Scripts/PromotionMenu.cs new file mode 100644 index 0000000..aa23d46 --- /dev/null +++ b/chess-game-project/Assets/Scripts/PromotionMenu.cs @@ -0,0 +1,49 @@ +//using System.Collections; +//using System.Collections.Generic; +//using UnityEngine; + +//public class PromotionMenu : MonoBehaviour +//{ +// public GameObject promotionMenu; +// //public Button queenButton; +// //public Button rookButton; +// //public Button bishopButton; +// //public Button knightButton; + +// private Piece promotedPiece; + +// public void ShowPromotionMenu(Piece piece) +// { +// promotedPiece = piece; +// promotionMenu.SetActive(true); +// } + +// public void HidePromotionMenu() +// { +// promotionMenu.SetActive(false); +// } + +// public void PromoteToQueen() +// { +// promotedPiece.PromoteTo(PieceType.Queen); +// HidePromotionMenu(); +// } + +// public void PromoteToRook() +// { +// promotedPiece.PromoteTo(PieceType.Rook); +// HidePromotionMenu(); +// } + +// public void PromoteToBishop() +// { +// promotedPiece.PromoteTo(PieceType.Bishop); +// HidePromotionMenu(); +// } + +// public void PromoteToKnight() +// { +// promotedPiece.PromoteTo(PieceType.Knight); +// HidePromotionMenu(); +// } +//} \ No newline at end of file diff --git a/chess-game-project/Assets/Scripts/PromotionMenu.cs.meta b/chess-game-project/Assets/Scripts/PromotionMenu.cs.meta new file mode 100644 index 0000000..369415b --- /dev/null +++ b/chess-game-project/Assets/Scripts/PromotionMenu.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 709c99c0c36f2894aa00585098a7acbf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/chess-game-project/UserSettings/EditorUserSettings.asset b/chess-game-project/UserSettings/EditorUserSettings.asset index cf95208..42080f5 100644 --- a/chess-game-project/UserSettings/EditorUserSettings.asset +++ b/chess-game-project/UserSettings/EditorUserSettings.asset @@ -12,10 +12,10 @@ EditorUserSettings: value: 025351575006085e5f5d5e7a16750744104e1e7b2f717360742d4830bab7636b flags: 0 RecentlyUsedSceneGuid-2: - value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 + value: 00550000560d5c5f0e585d7042710a444e4f1b7c2e707365782c4c62e4b2303c flags: 0 RecentlyUsedSceneGuid-3: - value: 00550000560d5c5f0e585d7042710a444e4f1b7c2e707365782c4c62e4b2303c + value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 flags: 0 vcSharedLogLevel: value: 0d5e400f0650 diff --git a/chess-game-project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt b/chess-game-project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt index 212bef2..c0ed0f3 100644 --- a/chess-game-project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt +++ b/chess-game-project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt @@ -14,17 +14,17 @@ MonoBehaviour: m_EditorClassIdentifier: m_Children: - {fileID: 3} - - {fileID: 13} + - {fileID: 12} m_Position: serializedVersion: 2 x: 0 y: 30 width: 1920 - height: 939 + height: 987 m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 99 + controlID: -1 --- !u!114 &2 MonoBehaviour: m_ObjectHideFlags: 52 @@ -45,22 +45,24 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 363 + x: 360 y: 73 - width: 1101 - height: 535 + width: 1104 + height: 567 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default m_SaveData: [] m_OverlaysVisible: 1 - m_SerializedViewNames: [] - m_SerializedViewValues: [] + m_SerializedViewNames: + - UnityEditor.DeviceSimulation.SimulatorWindow + m_SerializedViewValues: + - C:\Users\johan\Documents\GitHub\chessGame\chess-game-project\Library\PlayModeViewStates\c8dae6b1c212fd447ae74839190bdf2f m_PlayModeViewName: GameView m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 1920, y: 1080} + m_TargetSize: {x: 1104, y: 546} m_TextureFilterMode: 0 m_TextureHideFlags: 61 m_RenderIMGUI: 1 @@ -69,16 +71,16 @@ MonoBehaviour: m_VSyncEnabled: 0 m_Gizmos: 0 m_Stats: 0 - m_SelectedSizes: 03000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000 m_ZoomArea: m_HRangeLocked: 0 m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -960 - m_HBaseRangeMax: 960 - m_VBaseRangeMin: -540 - m_VBaseRangeMax: 540 + m_HBaseRangeMin: -552 + m_HBaseRangeMax: 552 + m_VBaseRangeMin: -273 + m_VBaseRangeMax: 273 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -96,23 +98,23 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 1101 - height: 514 - m_Scale: {x: 0.47592592, y: 0.47592592} - m_Translation: {x: 550.5, y: 257} + width: 1104 + height: 546 + m_Scale: {x: 1, y: 1} + m_Translation: {x: 552, y: 273} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -1156.6926 - y: -540 - width: 2313.3853 - height: 1080 + x: -552 + y: -273 + width: 1104 + height: 546 m_MinimalGUI: 1 - m_defaultScale: 0.47592592 - m_LastWindowPixelSize: {x: 1101, y: 535} + m_defaultScale: 1 + m_LastWindowPixelSize: {x: 1104, y: 567} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 @@ -138,11 +140,11 @@ MonoBehaviour: x: 0 y: 0 width: 1466 - height: 939 + height: 987 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 100 + controlID: -1 --- !u!114 &4 MonoBehaviour: m_ObjectHideFlags: 52 @@ -163,11 +165,11 @@ MonoBehaviour: x: 0 y: 0 width: 1466 - height: 556 + height: 588 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 101 + controlID: -1 --- !u!114 &5 MonoBehaviour: m_ObjectHideFlags: 52 @@ -185,10 +187,10 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 363 - height: 556 - m_MinSize: {x: 201, y: 221} - m_MaxSize: {x: 4001, y: 4021} + width: 360 + height: 588 + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} m_ActualView: {fileID: 6} m_Panes: - {fileID: 6} @@ -216,8 +218,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 73 - width: 362 - height: 535 + width: 359 + height: 567 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -226,9 +228,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: ea5c0000 - m_LastClickedID: 23786 - m_ExpandedIDs: 2cfbffff + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: 78f6ffff50f8ffff1afbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -244,7 +246,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} + m_ClientGUIView: {fileID: 12} m_SearchString: m_ExpandedScenes: [] m_CurrenRootInstanceID: 0 @@ -267,18 +269,18 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 363 + x: 360 y: 0 - width: 1103 - height: 556 - m_MinSize: {x: 202, y: 221} - m_MaxSize: {x: 4002, y: 4021} + width: 1106 + height: 588 + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} m_ActualView: {fileID: 2} m_Panes: - {fileID: 8} - {fileID: 2} m_Selected: 1 - m_LastSelected: 0 + m_LastSelected: 1 --- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 @@ -299,10 +301,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 363 + x: 360 y: 73 - width: 1101 - height: 535 + width: 1104 + height: 567 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -560,9 +562,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: -4.490522, y: 3.6926892, z: -0.12912214} + m_Target: {x: 0.46939754, y: 0.33698857, z: -2.0278175} speed: 2 - m_Value: {x: -4.490522, y: 3.6926892, z: -0.12912214} + m_Value: {x: 0.46939754, y: 0.33698857, z: -2.0278175} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -613,9 +615,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 1.681387 + m_Target: 6.508147 speed: 2 - m_Value: 1.681387 + m_Value: 6.508147 m_Ortho: m_Target: 1 speed: 2 @@ -633,7 +635,7 @@ MonoBehaviour: m_FarClip: 10000 m_DynamicClip: 1 m_OcclusionCulling: 0 - m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} + m_LastSceneViewRotation: {x: -0.15281723, y: 0.5731287, z: -0.1098136, w: -0.7975676} m_LastSceneViewOrtho: 0 m_ReplacementShader: {fileID: 0} m_ReplacementString: @@ -650,24 +652,23 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ProjectBrowser + m_Name: ConsoleWindow m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 x: 0 - y: 556 + y: 588 width: 1466 - height: 383 - m_MinSize: {x: 231, y: 271} - m_MaxSize: {x: 10001, y: 10021} - m_ActualView: {fileID: 10} + height: 399 + m_MinSize: {x: 100, y: 100} + m_MaxSize: {x: 4000, y: 4000} + m_ActualView: {fileID: 11} m_Panes: - {fileID: 10} - {fileID: 11} - - {fileID: 12} - m_Selected: 0 - m_LastSelected: 1 + m_Selected: 1 + m_LastSelected: 0 --- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 @@ -689,9 +690,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 629 + y: 661 width: 1465 - height: 362 + height: 378 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -710,22 +711,22 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/Objects + - Assets/Scripts m_Globs: [] m_OriginalText: m_ViewMode: 1 m_StartGridSize: 64 m_LastFolders: - - Assets/Objects + - Assets/Scripts m_LastFoldersGridSize: -1 - m_LastProjectPath: D:\Unity\Projects\chessGame\chess-game-project + m_LastProjectPath: C:\Users\johan\Documents\GitHub\chessGame\chess-game-project m_LockTracker: m_IsLocked: 0 m_FolderTreeState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: f05d0000 - m_LastClickedID: 24048 - m_ExpandedIDs: 000000002a5d0000365d0000685d0000785d000000ca9a3bffffff7f + scrollPos: {x: 0, y: 110} + m_SelectedIDs: 805f0000 + m_LastClickedID: 24448 + m_ExpandedIDs: 00000000745f0000765f0000785f00007a5f00007c5f00007e5f0000805f0000825f0000845f0000865f0000885f00008a5f00008c5f000000ca9a3b m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -753,7 +754,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000285d00002a5d00002c5d00002e5d0000 + m_ExpandedIDs: 00000000745f0000765f0000785f00007a5f00007c5f00007e5f0000805f0000825f0000845f0000865f0000885f00008a5f00008c5f0000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -778,8 +779,8 @@ MonoBehaviour: m_Icon: {fileID: 0} m_ResourceFile: m_ListAreaState: - m_SelectedInstanceIDs: ea5c0000 - m_LastClickedInstanceID: 23786 + m_SelectedInstanceIDs: 90f6ffff + m_LastClickedInstanceID: -2416 m_HadKeyboardFocusLastEvent: 1 m_ExpandedInstanceIDs: c6230000 m_RenameOverlay: @@ -830,9 +831,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 629 + y: 661 width: 1465 - height: 362 + height: 378 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -846,39 +847,9 @@ MonoBehaviour: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6629f1bb292b749a18b5fff7994c8b19, type: 3} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 600, y: 350} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Unity Version Control - m_Image: {fileID: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 0 - y: 629 - width: 1465 - height: 362 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 - mForceToOpen: 0 ---- !u!114 &13 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 + m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: InspectorWindow + m_Name: m_EditorClassIdentifier: m_Children: [] m_Position: @@ -886,15 +857,15 @@ MonoBehaviour: x: 1466 y: 0 width: 454 - height: 939 - m_MinSize: {x: 276, y: 71} - m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 14} + height: 987 + m_MinSize: {x: 275, y: 50} + m_MaxSize: {x: 4000, y: 4000} + m_ActualView: {fileID: 13} m_Panes: - - {fileID: 14} + - {fileID: 13} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &14 +--- !u!114 &13 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -917,7 +888,7 @@ MonoBehaviour: x: 1466 y: 73 width: 453 - height: 918 + height: 966 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default diff --git a/chess-game-project/UserSettings/Layouts/default-2021.dwlt b/chess-game-project/UserSettings/Layouts/default-2021.dwlt index d389f59..b1dff83 100644 --- a/chess-game-project/UserSettings/Layouts/default-2021.dwlt +++ b/chess-game-project/UserSettings/Layouts/default-2021.dwlt @@ -8,18 +8,18 @@ MonoBehaviour: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 - m_EditorHideFlags: 0 + m_EditorHideFlags: 1 m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} m_Name: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 72 - y: 144 - width: 1368 - height: 811 + x: 364 + y: 141 + width: 968 + height: 495 m_ShowMode: 4 - m_Title: Game + m_Title: m_RootView: {fileID: 6} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} @@ -43,12 +43,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 30 - width: 1368 - height: 761 - m_MinSize: {x: 300, y: 200} - m_MaxSize: {x: 24288, y: 16192} + width: 968 + height: 445 + m_MinSize: {x: 679, y: 492} + m_MaxSize: {x: 14002, y: 14042} vertical: 0 - controlID: 96 + controlID: 47 --- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 @@ -64,10 +64,10 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 1045 + x: 738 y: 0 - width: 323 - height: 761 + width: 230 + height: 445 m_MinSize: {x: 276, y: 71} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 13} @@ -92,8 +92,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 258 - height: 448 + width: 182 + height: 264 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 14} @@ -111,23 +111,23 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ConsoleWindow + m_Name: ProjectBrowser m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 x: 0 - y: 448 - width: 1045 - height: 313 + y: 264 + width: 738 + height: 181 m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} - m_ActualView: {fileID: 13} + m_ActualView: {fileID: 12} m_Panes: - {fileID: 12} - {fileID: 17} - m_Selected: 1 - m_LastSelected: 0 + m_Selected: 0 + m_LastSelected: 1 --- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 @@ -148,8 +148,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1368 - height: 811 + width: 968 + height: 495 m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 @@ -173,7 +173,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1368 + width: 968 height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -194,8 +194,8 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 791 - width: 1368 + y: 475 + width: 968 height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -218,11 +218,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1045 - height: 761 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 16192, y: 16192} + width: 738 + height: 445 + m_MinSize: {x: 403, y: 492} + m_MaxSize: {x: 10001, y: 14042} vertical: 1 + controlID: 48 --- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 @@ -242,12 +243,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1045 - height: 448 - m_MinSize: {x: 200, y: 100} - m_MaxSize: {x: 16192, y: 8096} + width: 738 + height: 264 + m_MinSize: {x: 403, y: 221} + m_MaxSize: {x: 8003, y: 4021} vertical: 0 - controlID: 98 + controlID: 49 --- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 @@ -258,68 +259,24 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: GameView + m_Name: m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 - x: 258 + x: 182 y: 0 - width: 787 - height: 448 + width: 556 + height: 264 m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} - m_ActualView: {fileID: 17} + m_ActualView: {fileID: 15} m_Panes: - {fileID: 15} - {fileID: 16} - - {fileID: 17} - - {fileID: 12} - m_Selected: 1 - m_LastSelected: 0 + m_Selected: 0 + m_LastSelected: 1 --- !u!114 &12 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 275, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Inspector - m_Image: {fileID: -2667387946076563598, guid: 0000000000000000d000000000000000, type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 362 - y: 73 - width: 1102 - height: 563 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 - m_ObjectsLockedBeforeSerialization: [] - m_InstanceIDsLockedBeforeSerialization: - m_PreviewResizer: - m_CachedPref: 409 - m_ControlHash: 1412526313 - m_PrefName: Preview_InspectorPreview - m_LastInspectedObjectInstanceID: 24542 - m_LastVerticalScrollValue: 0 - m_GlobalObjectId: - m_InspectorMode: 0 - m_LockTracker: - m_IsLocked: 0 - m_PreviewWindow: {fileID: 0} ---- !u!114 &13 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -339,10 +296,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 72 - y: 647 - width: 1044 - height: 292 + x: 364 + y: 435 + width: 737 + height: 160 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -361,22 +318,22 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/Assets/Sprites/Tiles + - Assets m_Globs: [] m_OriginalText: m_ViewMode: 1 m_StartGridSize: 64 m_LastFolders: - - Assets/Assets/Sprites/Tiles + - Assets m_LastFoldersGridSize: -1 - m_LastProjectPath: /home/igor/Documentos/UFF/Graduacao/7_periodo/ES2/chessGame/chess-game-project + m_LastProjectPath: C:\Users\johan\Documents\GitHub\chessGame\chess-game-project m_LockTracker: m_IsLocked: 0 m_FolderTreeState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: de5f0000 - m_LastClickedID: 24542 - m_ExpandedIDs: 00000000b85f0000bc5f0000d05f000000ca9a3b + m_SelectedIDs: 7c5f0000 + m_LastClickedID: 24444 + m_ExpandedIDs: 000000007c5f00007e5f0000805f0000825f0000845f0000865f0000885f00008a5f00008c5f00008e5f0000905f0000925f0000945f000000ca9a3b m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -404,7 +361,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000 + m_ExpandedIDs: 000000007c5f00007e5f0000805f0000825f0000845f0000865f0000885f00008a5f00008c5f00008e5f0000905f0000925f0000945f0000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -432,7 +389,7 @@ MonoBehaviour: m_SelectedInstanceIDs: m_LastClickedInstanceID: 0 m_HadKeyboardFocusLastEvent: 0 - m_ExpandedInstanceIDs: c62300005e6c0000f86a0000f4680000e6650000 + m_ExpandedInstanceIDs: c6230000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -448,7 +405,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 5} + m_ClientGUIView: {fileID: 0} m_CreateAssetUtility: m_EndAction: {fileID: 0} m_InstanceID: 0 @@ -480,10 +437,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1117 - y: 199 - width: 322 - height: 740 + x: 1102 + y: 171 + width: 229 + height: 424 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -522,10 +479,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 72 - y: 199 - width: 257 - height: 427 + x: 364 + y: 171 + width: 181 + height: 243 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -534,9 +491,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: de5f0000 + m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 0cfbffff + m_ExpandedIDs: 0efbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -552,7 +509,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 4} + m_ClientGUIView: {fileID: 0} m_SearchString: m_ExpandedScenes: [] m_CurrenRootInstanceID: 0 @@ -580,10 +537,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1802 - y: 92 - width: 1103 - height: 550 + x: 546 + y: 171 + width: 554 + height: 243 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -637,7 +594,7 @@ MonoBehaviour: floating: 0 collapsed: 0 displayed: 1 - snapOffset: {x: 0, y: 25} + snapOffset: {x: 0, y: 0} snapOffsetDelta: {x: 0, y: 0} snapCorner: 0 id: unity-transform-toolbar @@ -841,9 +798,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: 0.8157873, y: -0.016838798, z: -0.085324034} + m_Target: {x: 0, y: 0, z: 0} speed: 2 - m_Value: {x: 0.8157873, y: -0.016838798, z: -0.085324034} + m_Value: {x: 0.016069457, y: 0.05938372, z: -0.054735783} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -874,7 +831,7 @@ MonoBehaviour: m_Fade: m_Target: 0 speed: 2 - m_Value: 0 + m_Value: 1 m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} m_Pivot: {x: 0, y: 0, z: 0} m_Size: {x: 1, y: 1} @@ -894,9 +851,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 5.977448 + m_Target: 10 speed: 2 - m_Value: 5.977448 + m_Value: 5.678701 m_Ortho: m_Target: 1 speed: 2 @@ -941,10 +898,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 330 - y: 199 - width: 785 - height: 427 + x: 507 + y: 94 + width: 1532 + height: 790 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -956,25 +913,25 @@ MonoBehaviour: m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 1920, y: 1080} + m_TargetSize: {x: 1532, y: 769} m_TextureFilterMode: 0 m_TextureHideFlags: 61 - m_RenderIMGUI: 1 + m_RenderIMGUI: 0 m_EnterPlayModeBehavior: 0 m_UseMipMap: 0 m_VSyncEnabled: 0 m_Gizmos: 0 m_Stats: 0 - m_SelectedSizes: 03000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000 m_ZoomArea: m_HRangeLocked: 0 m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -960 - m_HBaseRangeMax: 960 - m_VBaseRangeMin: -540 - m_VBaseRangeMax: 540 + m_HBaseRangeMin: -766 + m_HBaseRangeMax: 766 + m_VBaseRangeMin: -384.5 + m_VBaseRangeMax: 384.5 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -992,23 +949,23 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 785 - height: 406 - m_Scale: {x: 0.37592593, y: 0.37592593} - m_Translation: {x: 392.5, y: 203} + width: 1532 + height: 769 + m_Scale: {x: 1, y: 1} + m_Translation: {x: 766, y: 384.5} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -1044.0886 - y: -540 - width: 2088.1772 - height: 1080 + x: -766 + y: -384.5 + width: 1532 + height: 769 m_MinimalGUI: 1 - m_defaultScale: 0.37592593 - m_LastWindowPixelSize: {x: 785, y: 427} + m_defaultScale: 1 + m_LastWindowPixelSize: {x: 1532, y: 790} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 @@ -1034,10 +991,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 0 - y: 629 - width: 1465 - height: 362 + x: 2249 + y: 726.5 + width: 920 + height: 250 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default From 1965ad8b10f7c87af37b3782c1b44f4e4acc2dd3 Mon Sep 17 00:00:00 2001 From: Johann Daflon Date: Thu, 15 Jun 2023 20:02:53 -0300 Subject: [PATCH 08/13] Revert "Promotion Menu" This reverts commit 08029f5eae08d06a32ceb0f19220a34fd6a8b89a. --- chess-game-project/Assets/Scenes/Game.unity | 1260 +---------------- chess-game-project/Assets/Scripts/Chessman.cs | 31 - .../Assets/Scripts/MovePlate.cs | 102 +- .../Assets/Scripts/PromotionMenu.cs | 49 - .../Assets/Scripts/PromotionMenu.cs.meta | 11 - .../UserSettings/EditorUserSettings.asset | 4 +- .../Layouts/CurrentMaximizeLayout.dwlt | 199 +-- .../UserSettings/Layouts/default-2021.dwlt | 251 ++-- 8 files changed, 320 insertions(+), 1587 deletions(-) delete mode 100644 chess-game-project/Assets/Scripts/PromotionMenu.cs delete mode 100644 chess-game-project/Assets/Scripts/PromotionMenu.cs.meta diff --git a/chess-game-project/Assets/Scenes/Game.unity b/chess-game-project/Assets/Scenes/Game.unity index 2359c73..231219d 100644 --- a/chess-game-project/Assets/Scenes/Game.unity +++ b/chess-game-project/Assets/Scenes/Game.unity @@ -123,282 +123,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &28844586 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 28844588} - m_Layer: 0 - m_Name: PromotionMenu - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &28844588 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 28844586} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.3} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1203982100} - m_Father: {fileID: 0} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &134692005 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 134692006} - - component: {fileID: 134692009} - - component: {fileID: 134692008} - - component: {fileID: 134692007} - m_Layer: 5 - m_Name: CavaloBtn - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &134692006 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 134692005} - 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: - - {fileID: 1223618273} - m_Father: {fileID: 1203982100} - m_RootOrder: 2 - 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: 299, y: 144} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &134692007 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 134692005} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 134692008} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!114 &134692008 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 134692005} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - 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 &134692009 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 134692005} - m_CullTransparentMesh: 1 ---- !u!1 &407499589 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 407499590} - - component: {fileID: 407499593} - - component: {fileID: 407499592} - - component: {fileID: 407499591} - m_Layer: 5 - m_Name: BispoBtn - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &407499590 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 407499589} - 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: - - {fileID: 598793263} - m_Father: {fileID: 1203982100} - m_RootOrder: 3 - 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: 299, y: 114} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &407499591 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 407499589} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 407499592} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!114 &407499592 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 407499589} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - 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 &407499593 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 407499589} - m_CullTransparentMesh: 1 --- !u!1 &519420028 GameObject: m_ObjectHideFlags: 0 @@ -563,276 +287,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 584682953} m_CullTransparentMesh: 1 ---- !u!1 &598793262 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 598793263} - - component: {fileID: 598793265} - - component: {fileID: 598793264} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &598793263 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 598793262} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 90} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 407499590} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &598793264 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 598793262} - m_Enabled: 1 - 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: Bispo - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4281479730 - m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 24 - m_fontSizeBase: 24 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 - 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 &598793265 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 598793262} - m_CullTransparentMesh: 1 ---- !u!1 &770949159 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 770949160} - - component: {fileID: 770949162} - - component: {fileID: 770949161} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &770949160 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 770949159} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 90} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2054675720} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &770949161 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 770949159} - m_Enabled: 1 - 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: Torre - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4281479730 - m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 24 - m_fontSizeBase: 24 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 - 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 &770949162 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 770949159} - m_CullTransparentMesh: 1 --- !u!1 &848132681 GameObject: m_ObjectHideFlags: 0 @@ -894,309 +348,70 @@ GameObject: m_TagString: WinnerText m_Icon: {fileID: 0} m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1085988843 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085988842} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1261937589} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.23952085, y: 0.6254073} - m_AnchorMax: {x: 0.76100004, y: 0.95000005} - m_AnchoredPosition: {x: 0.1800232, y: 1.3099976} - m_SizeDelta: {x: -4.730011, y: -5.1900024} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1085988844 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085988842} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, 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_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 80 - m_FontStyle: 3 - m_BestFit: 0 - m_MinSize: 4 - m_MaxSize: 80 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Game Over, aperte para sair. ---- !u!222 &1085988845 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085988842} - m_CullTransparentMesh: 1 ---- !u!1 &1171371335 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1171371336} - - component: {fileID: 1171371338} - - component: {fileID: 1171371337} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1171371336 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1171371335} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 90} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1946311501} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1171371337 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1171371335} - m_Enabled: 1 - 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: Rainha - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4281479730 - m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 24 - m_fontSizeBase: 24 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 - 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 &1171371338 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1171371335} - m_CullTransparentMesh: 1 ---- !u!1 &1203982099 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1203982100} - - component: {fileID: 1203982103} - - component: {fileID: 1203982102} - - component: {fileID: 1203982101} - m_Layer: 5 - m_Name: CanvaMenu - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1203982100 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1203982099} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -2.6} - m_LocalScale: {x: 0.01831502, y: 0.01831502, z: 0.01831502} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1946311501} - - {fileID: 2054675720} - - {fileID: 134692006} - - {fileID: 407499590} - m_Father: {fileID: 28844588} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 1104, y: 546} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1203982101 -MonoBehaviour: + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1085988843 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1203982099} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &1203982102 + m_GameObject: {fileID: 1085988842} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 2} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1261937589} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.23952085, y: 0.6254073} + m_AnchorMax: {x: 0.76100004, y: 0.95000005} + m_AnchoredPosition: {x: 0.1800232, y: 1.3099976} + m_SizeDelta: {x: -4.730011, y: -5.1900024} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1085988844 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1203982099} - m_Enabled: 1 + m_GameObject: {fileID: 1085988842} + m_Enabled: 0 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 1 ---- !u!223 &1203982103 -Canvas: + m_Material: {fileID: 0} + m_Color: {r: 0, 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 80 + m_FontStyle: 3 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 80 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Game Over, aperte para sair. +--- !u!222 &1085988845 +CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1203982099} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 2 - m_Camera: {fileID: 519420031} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 25 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 + m_GameObject: {fileID: 1085988842} + m_CullTransparentMesh: 1 --- !u!1 &1206968598 GameObject: m_ObjectHideFlags: 0 @@ -1308,141 +523,6 @@ MonoBehaviour: - {fileID: 21300000, guid: 2e95eda1ff934164db5526ecabd5da7a, type: 3} - {fileID: 21300000, guid: 044d6e38a893bff4c9444b5a4b0db091, type: 3} - {fileID: 21300000, guid: d0024b839053f92459d1bf3a6cbc2422, type: 3} ---- !u!1 &1223618272 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1223618273} - - component: {fileID: 1223618275} - - component: {fileID: 1223618274} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1223618273 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1223618272} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 90} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 134692006} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1223618274 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1223618272} - m_Enabled: 1 - 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: Cavalo - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4281479730 - m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 24 - m_fontSizeBase: 24 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 - 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 &1223618275 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1223618272} - m_CullTransparentMesh: 1 --- !u!1 &1261937585 GameObject: m_ObjectHideFlags: 0 @@ -1656,250 +736,6 @@ MonoBehaviour: - {fileID: 21300000, guid: 6eed6028af9d489498528a165c16d3da, type: 3} - {fileID: 21300000, guid: b73bbb6d77d918e42b8c2747cd5e0072, type: 3} - {fileID: 21300000, guid: 8dc6ecd7b73c30b42a92a1b3def9b513, type: 3} ---- !u!1 &1946311500 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1946311501} - - component: {fileID: 1946311504} - - component: {fileID: 1946311503} - - component: {fileID: 1946311502} - m_Layer: 5 - m_Name: RainhaBtn - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1946311501 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1946311500} - 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: - - {fileID: 1171371336} - m_Father: {fileID: 1203982100} - m_RootOrder: 0 - 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: 299, y: 204} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1946311502 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1946311500} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 1946311503} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!114 &1946311503 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1946311500} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - 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 &1946311504 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1946311500} - m_CullTransparentMesh: 1 ---- !u!1 &2054675719 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2054675720} - - component: {fileID: 2054675723} - - component: {fileID: 2054675722} - - component: {fileID: 2054675721} - m_Layer: 5 - m_Name: TorreBtn - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2054675720 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054675719} - 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: - - {fileID: 770949160} - m_Father: {fileID: 1203982100} - m_RootOrder: 1 - 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: 299, y: 174} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2054675721 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054675719} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 2054675722} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!114 &2054675722 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054675719} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - 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 &2054675723 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054675719} - m_CullTransparentMesh: 1 --- !u!1 &2106842907 GameObject: m_ObjectHideFlags: 0 diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index 86c247f..68b5774 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -151,41 +151,10 @@ public Sprite GetWhiteQueen() { return whiteQueen[setID]; } - - public Sprite GetWhiteTower() - { - return whiteTower[setID]; - } - - public Sprite GetWhiteBishop() - { - return whiteBishop[setID]; - } - - public Sprite GetWhiteKnight() - { - return whiteKnight[setID]; - } - public Sprite GetBlackQueen() { return blackQueen[setID]; } - - public Sprite GetBlackTower() - { - return blackTower[setID]; - } - - public Sprite GetBlackBishop() - { - return blackBishop[setID]; - } - - public Sprite GetBlackKnight() - { - return blackKnight[setID]; - } /* Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index 78a8273..c40efc2 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -using UnityEditor; public class MovePlate : MonoBehaviour { @@ -35,57 +34,11 @@ public void Start() } } - public static PieceType ShowPromotionMenu() - { - PieceType selectedPiece = PieceType.Queen; - bool promote = true; - - if (promote) - { - bool queen = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Rainha", "Torre"); - if (queen) - { - selectedPiece = PieceType.Queen; - } - else - { - bool tower = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Torre", "Bispo"); - if (tower) - { - selectedPiece = PieceType.Tower; - } - else - { - bool bishop = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Bispo", "Cavalo"); - if (bishop) - { - selectedPiece = PieceType.Bishop; - } - else - { - selectedPiece = PieceType.Knight; - } - } - } - } - - return selectedPiece; - } - - - public enum PieceType - { - Queen, - Tower, - Bishop, - Knight - } - -/* - Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. - Nesse caso, essa OnMouseUp é responsável pela troca de um moveplate com a peça - que está sofrendo a interação do usuário. -*/ + /* + Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. + Nesse caso, essa OnMouseUp é responsável pela troca de um moveplate com a peça + que está sofrendo a interação do usuário. + */ public void OnMouseUp() { controller = GameObject.FindGameObjectWithTag("GameController"); @@ -128,52 +81,15 @@ public void OnMouseUp() if (promote) { GameObject cp = controller.GetComponent().GetPosition(matrixX, matrixY); - PieceType promocao = ShowPromotionMenu(); if (matrixY == 7) { - if(promocao == PieceType.Tower) - { - cp.name = "whiteTower"; - cp.GetComponent().sprite = reference.GetComponent().GetWhiteTower(); - } - if(promocao == PieceType.Queen) - { - cp.name = "whiteQueen"; - cp.GetComponent().sprite = reference.GetComponent().GetWhiteQueen(); - } - if(promocao == PieceType.Bishop) - { - cp.name = "whiteBishop"; - cp.GetComponent().sprite = reference.GetComponent().GetWhiteBishop(); - } - if(promocao == PieceType.Knight) - { - cp.name = "whiteKnight"; - cp.GetComponent().sprite = reference.GetComponent().GetWhiteKnight(); - } + cp.name = "whiteQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteQueen(); } else { - if (promocao == PieceType.Tower) - { - cp.name = "blackTower"; - cp.GetComponent().sprite = reference.GetComponent().GetBlackTower(); - } - if (promocao == PieceType.Queen) - { - cp.name = "blackQueen"; - cp.GetComponent().sprite = reference.GetComponent().GetBlackQueen(); - } - if (promocao == PieceType.Bishop) - { - cp.name = "blackBishop"; - cp.GetComponent().sprite = reference.GetComponent().GetBlackBishop(); - } - if (promocao == PieceType.Knight) - { - cp.name = "blackKnight"; - cp.GetComponent().sprite = reference.GetComponent().GetBlackKnight(); - } + cp.name = "blackQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackQueen(); } } //Alterna o jogador atual diff --git a/chess-game-project/Assets/Scripts/PromotionMenu.cs b/chess-game-project/Assets/Scripts/PromotionMenu.cs deleted file mode 100644 index aa23d46..0000000 --- a/chess-game-project/Assets/Scripts/PromotionMenu.cs +++ /dev/null @@ -1,49 +0,0 @@ -//using System.Collections; -//using System.Collections.Generic; -//using UnityEngine; - -//public class PromotionMenu : MonoBehaviour -//{ -// public GameObject promotionMenu; -// //public Button queenButton; -// //public Button rookButton; -// //public Button bishopButton; -// //public Button knightButton; - -// private Piece promotedPiece; - -// public void ShowPromotionMenu(Piece piece) -// { -// promotedPiece = piece; -// promotionMenu.SetActive(true); -// } - -// public void HidePromotionMenu() -// { -// promotionMenu.SetActive(false); -// } - -// public void PromoteToQueen() -// { -// promotedPiece.PromoteTo(PieceType.Queen); -// HidePromotionMenu(); -// } - -// public void PromoteToRook() -// { -// promotedPiece.PromoteTo(PieceType.Rook); -// HidePromotionMenu(); -// } - -// public void PromoteToBishop() -// { -// promotedPiece.PromoteTo(PieceType.Bishop); -// HidePromotionMenu(); -// } - -// public void PromoteToKnight() -// { -// promotedPiece.PromoteTo(PieceType.Knight); -// HidePromotionMenu(); -// } -//} \ No newline at end of file diff --git a/chess-game-project/Assets/Scripts/PromotionMenu.cs.meta b/chess-game-project/Assets/Scripts/PromotionMenu.cs.meta deleted file mode 100644 index 369415b..0000000 --- a/chess-game-project/Assets/Scripts/PromotionMenu.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 709c99c0c36f2894aa00585098a7acbf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/chess-game-project/UserSettings/EditorUserSettings.asset b/chess-game-project/UserSettings/EditorUserSettings.asset index 42080f5..cf95208 100644 --- a/chess-game-project/UserSettings/EditorUserSettings.asset +++ b/chess-game-project/UserSettings/EditorUserSettings.asset @@ -12,10 +12,10 @@ EditorUserSettings: value: 025351575006085e5f5d5e7a16750744104e1e7b2f717360742d4830bab7636b flags: 0 RecentlyUsedSceneGuid-2: - value: 00550000560d5c5f0e585d7042710a444e4f1b7c2e707365782c4c62e4b2303c + value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 flags: 0 RecentlyUsedSceneGuid-3: - value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 + value: 00550000560d5c5f0e585d7042710a444e4f1b7c2e707365782c4c62e4b2303c flags: 0 vcSharedLogLevel: value: 0d5e400f0650 diff --git a/chess-game-project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt b/chess-game-project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt index c0ed0f3..212bef2 100644 --- a/chess-game-project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt +++ b/chess-game-project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt @@ -14,17 +14,17 @@ MonoBehaviour: m_EditorClassIdentifier: m_Children: - {fileID: 3} - - {fileID: 12} + - {fileID: 13} m_Position: serializedVersion: 2 x: 0 y: 30 width: 1920 - height: 987 + height: 939 m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: -1 + controlID: 99 --- !u!114 &2 MonoBehaviour: m_ObjectHideFlags: 52 @@ -45,24 +45,22 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 360 + x: 363 y: 73 - width: 1104 - height: 567 + width: 1101 + height: 535 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default m_SaveData: [] m_OverlaysVisible: 1 - m_SerializedViewNames: - - UnityEditor.DeviceSimulation.SimulatorWindow - m_SerializedViewValues: - - C:\Users\johan\Documents\GitHub\chessGame\chess-game-project\Library\PlayModeViewStates\c8dae6b1c212fd447ae74839190bdf2f + m_SerializedViewNames: [] + m_SerializedViewValues: [] m_PlayModeViewName: GameView m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 1104, y: 546} + m_TargetSize: {x: 1920, y: 1080} m_TextureFilterMode: 0 m_TextureHideFlags: 61 m_RenderIMGUI: 1 @@ -71,16 +69,16 @@ MonoBehaviour: m_VSyncEnabled: 0 m_Gizmos: 0 m_Stats: 0 - m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_SelectedSizes: 03000000000000000000000000000000000000000000000000000000000000000000000000000000 m_ZoomArea: m_HRangeLocked: 0 m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -552 - m_HBaseRangeMax: 552 - m_VBaseRangeMin: -273 - m_VBaseRangeMax: 273 + m_HBaseRangeMin: -960 + m_HBaseRangeMax: 960 + m_VBaseRangeMin: -540 + m_VBaseRangeMax: 540 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -98,23 +96,23 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 1104 - height: 546 - m_Scale: {x: 1, y: 1} - m_Translation: {x: 552, y: 273} + width: 1101 + height: 514 + m_Scale: {x: 0.47592592, y: 0.47592592} + m_Translation: {x: 550.5, y: 257} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -552 - y: -273 - width: 1104 - height: 546 + x: -1156.6926 + y: -540 + width: 2313.3853 + height: 1080 m_MinimalGUI: 1 - m_defaultScale: 1 - m_LastWindowPixelSize: {x: 1104, y: 567} + m_defaultScale: 0.47592592 + m_LastWindowPixelSize: {x: 1101, y: 535} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 @@ -140,11 +138,11 @@ MonoBehaviour: x: 0 y: 0 width: 1466 - height: 987 + height: 939 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: -1 + controlID: 100 --- !u!114 &4 MonoBehaviour: m_ObjectHideFlags: 52 @@ -165,11 +163,11 @@ MonoBehaviour: x: 0 y: 0 width: 1466 - height: 588 + height: 556 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: -1 + controlID: 101 --- !u!114 &5 MonoBehaviour: m_ObjectHideFlags: 52 @@ -187,10 +185,10 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 360 - height: 588 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} + width: 363 + height: 556 + m_MinSize: {x: 201, y: 221} + m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 6} m_Panes: - {fileID: 6} @@ -218,8 +216,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 73 - width: 359 - height: 567 + width: 362 + height: 535 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -228,9 +226,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: 78f6ffff50f8ffff1afbffff + m_SelectedIDs: ea5c0000 + m_LastClickedID: 23786 + m_ExpandedIDs: 2cfbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -246,7 +244,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 12} + m_ClientGUIView: {fileID: 0} m_SearchString: m_ExpandedScenes: [] m_CurrenRootInstanceID: 0 @@ -269,18 +267,18 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 360 + x: 363 y: 0 - width: 1106 - height: 588 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} + width: 1103 + height: 556 + m_MinSize: {x: 202, y: 221} + m_MaxSize: {x: 4002, y: 4021} m_ActualView: {fileID: 2} m_Panes: - {fileID: 8} - {fileID: 2} m_Selected: 1 - m_LastSelected: 1 + m_LastSelected: 0 --- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 @@ -301,10 +299,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 360 + x: 363 y: 73 - width: 1104 - height: 567 + width: 1101 + height: 535 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -562,9 +560,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: 0.46939754, y: 0.33698857, z: -2.0278175} + m_Target: {x: -4.490522, y: 3.6926892, z: -0.12912214} speed: 2 - m_Value: {x: 0.46939754, y: 0.33698857, z: -2.0278175} + m_Value: {x: -4.490522, y: 3.6926892, z: -0.12912214} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -615,9 +613,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 6.508147 + m_Target: 1.681387 speed: 2 - m_Value: 6.508147 + m_Value: 1.681387 m_Ortho: m_Target: 1 speed: 2 @@ -635,7 +633,7 @@ MonoBehaviour: m_FarClip: 10000 m_DynamicClip: 1 m_OcclusionCulling: 0 - m_LastSceneViewRotation: {x: -0.15281723, y: 0.5731287, z: -0.1098136, w: -0.7975676} + m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} m_LastSceneViewOrtho: 0 m_ReplacementShader: {fileID: 0} m_ReplacementString: @@ -652,23 +650,24 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ConsoleWindow + m_Name: ProjectBrowser m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 x: 0 - y: 588 + y: 556 width: 1466 - height: 399 - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 11} + height: 383 + m_MinSize: {x: 231, y: 271} + m_MaxSize: {x: 10001, y: 10021} + m_ActualView: {fileID: 10} m_Panes: - {fileID: 10} - {fileID: 11} - m_Selected: 1 - m_LastSelected: 0 + - {fileID: 12} + m_Selected: 0 + m_LastSelected: 1 --- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 @@ -690,9 +689,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 661 + y: 629 width: 1465 - height: 378 + height: 362 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -711,22 +710,22 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/Scripts + - Assets/Objects m_Globs: [] m_OriginalText: m_ViewMode: 1 m_StartGridSize: 64 m_LastFolders: - - Assets/Scripts + - Assets/Objects m_LastFoldersGridSize: -1 - m_LastProjectPath: C:\Users\johan\Documents\GitHub\chessGame\chess-game-project + m_LastProjectPath: D:\Unity\Projects\chessGame\chess-game-project m_LockTracker: m_IsLocked: 0 m_FolderTreeState: - scrollPos: {x: 0, y: 110} - m_SelectedIDs: 805f0000 - m_LastClickedID: 24448 - m_ExpandedIDs: 00000000745f0000765f0000785f00007a5f00007c5f00007e5f0000805f0000825f0000845f0000865f0000885f00008a5f00008c5f000000ca9a3b + scrollPos: {x: 0, y: 0} + m_SelectedIDs: f05d0000 + m_LastClickedID: 24048 + m_ExpandedIDs: 000000002a5d0000365d0000685d0000785d000000ca9a3bffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -754,7 +753,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000745f0000765f0000785f00007a5f00007c5f00007e5f0000805f0000825f0000845f0000865f0000885f00008a5f00008c5f0000 + m_ExpandedIDs: 00000000285d00002a5d00002c5d00002e5d0000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -779,8 +778,8 @@ MonoBehaviour: m_Icon: {fileID: 0} m_ResourceFile: m_ListAreaState: - m_SelectedInstanceIDs: 90f6ffff - m_LastClickedInstanceID: -2416 + m_SelectedInstanceIDs: ea5c0000 + m_LastClickedInstanceID: 23786 m_HadKeyboardFocusLastEvent: 1 m_ExpandedInstanceIDs: c6230000 m_RenameOverlay: @@ -831,9 +830,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 661 + y: 629 width: 1465 - height: 378 + height: 362 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -847,25 +846,55 @@ MonoBehaviour: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6629f1bb292b749a18b5fff7994c8b19, type: 3} m_Name: m_EditorClassIdentifier: + m_MinSize: {x: 600, y: 350} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Unity Version Control + m_Image: {fileID: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 0 + y: 629 + width: 1465 + height: 362 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_OverlaysVisible: 1 + mForceToOpen: 0 +--- !u!114 &13 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: InspectorWindow + m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 x: 1466 y: 0 width: 454 - height: 987 - m_MinSize: {x: 275, y: 50} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 13} + height: 939 + m_MinSize: {x: 276, y: 71} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 14} m_Panes: - - {fileID: 13} + - {fileID: 14} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &13 +--- !u!114 &14 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -888,7 +917,7 @@ MonoBehaviour: x: 1466 y: 73 width: 453 - height: 966 + height: 918 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default diff --git a/chess-game-project/UserSettings/Layouts/default-2021.dwlt b/chess-game-project/UserSettings/Layouts/default-2021.dwlt index b1dff83..d389f59 100644 --- a/chess-game-project/UserSettings/Layouts/default-2021.dwlt +++ b/chess-game-project/UserSettings/Layouts/default-2021.dwlt @@ -8,18 +8,18 @@ MonoBehaviour: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 - m_EditorHideFlags: 1 + m_EditorHideFlags: 0 m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} m_Name: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 364 - y: 141 - width: 968 - height: 495 + x: 72 + y: 144 + width: 1368 + height: 811 m_ShowMode: 4 - m_Title: + m_Title: Game m_RootView: {fileID: 6} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} @@ -43,12 +43,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 30 - width: 968 - height: 445 - m_MinSize: {x: 679, y: 492} - m_MaxSize: {x: 14002, y: 14042} + width: 1368 + height: 761 + m_MinSize: {x: 300, y: 200} + m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 47 + controlID: 96 --- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 @@ -64,10 +64,10 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 738 + x: 1045 y: 0 - width: 230 - height: 445 + width: 323 + height: 761 m_MinSize: {x: 276, y: 71} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 13} @@ -92,8 +92,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 182 - height: 264 + width: 258 + height: 448 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 14} @@ -111,23 +111,23 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ProjectBrowser + m_Name: ConsoleWindow m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 x: 0 - y: 264 - width: 738 - height: 181 + y: 448 + width: 1045 + height: 313 m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} - m_ActualView: {fileID: 12} + m_ActualView: {fileID: 13} m_Panes: - {fileID: 12} - {fileID: 17} - m_Selected: 0 - m_LastSelected: 1 + m_Selected: 1 + m_LastSelected: 0 --- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 @@ -148,8 +148,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 968 - height: 495 + width: 1368 + height: 811 m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 @@ -173,7 +173,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 968 + width: 1368 height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -194,8 +194,8 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 475 - width: 968 + y: 791 + width: 1368 height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -218,12 +218,11 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 738 - height: 445 - m_MinSize: {x: 403, y: 492} - m_MaxSize: {x: 10001, y: 14042} + width: 1045 + height: 761 + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 48 --- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 @@ -243,12 +242,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 738 - height: 264 - m_MinSize: {x: 403, y: 221} - m_MaxSize: {x: 8003, y: 4021} + width: 1045 + height: 448 + m_MinSize: {x: 200, y: 100} + m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 49 + controlID: 98 --- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 @@ -259,24 +258,68 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: + m_Name: GameView m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 - x: 182 + x: 258 y: 0 - width: 556 - height: 264 + width: 787 + height: 448 m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} - m_ActualView: {fileID: 15} + m_ActualView: {fileID: 17} m_Panes: - {fileID: 15} - {fileID: 16} - m_Selected: 0 - m_LastSelected: 1 + - {fileID: 17} + - {fileID: 12} + m_Selected: 1 + m_LastSelected: 0 --- !u!114 &12 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 275, y: 100} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Inspector + m_Image: {fileID: -2667387946076563598, guid: 0000000000000000d000000000000000, type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 362 + y: 73 + width: 1102 + height: 563 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_OverlaysVisible: 1 + m_ObjectsLockedBeforeSerialization: [] + m_InstanceIDsLockedBeforeSerialization: + m_PreviewResizer: + m_CachedPref: 409 + m_ControlHash: 1412526313 + m_PrefName: Preview_InspectorPreview + m_LastInspectedObjectInstanceID: 24542 + m_LastVerticalScrollValue: 0 + m_GlobalObjectId: + m_InspectorMode: 0 + m_LockTracker: + m_IsLocked: 0 + m_PreviewWindow: {fileID: 0} +--- !u!114 &13 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -296,10 +339,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 364 - y: 435 - width: 737 - height: 160 + x: 72 + y: 647 + width: 1044 + height: 292 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -318,22 +361,22 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets + - Assets/Assets/Sprites/Tiles m_Globs: [] m_OriginalText: m_ViewMode: 1 m_StartGridSize: 64 m_LastFolders: - - Assets + - Assets/Assets/Sprites/Tiles m_LastFoldersGridSize: -1 - m_LastProjectPath: C:\Users\johan\Documents\GitHub\chessGame\chess-game-project + m_LastProjectPath: /home/igor/Documentos/UFF/Graduacao/7_periodo/ES2/chessGame/chess-game-project m_LockTracker: m_IsLocked: 0 m_FolderTreeState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: 7c5f0000 - m_LastClickedID: 24444 - m_ExpandedIDs: 000000007c5f00007e5f0000805f0000825f0000845f0000865f0000885f00008a5f00008c5f00008e5f0000905f0000925f0000945f000000ca9a3b + m_SelectedIDs: de5f0000 + m_LastClickedID: 24542 + m_ExpandedIDs: 00000000b85f0000bc5f0000d05f000000ca9a3b m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -361,7 +404,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 000000007c5f00007e5f0000805f0000825f0000845f0000865f0000885f00008a5f00008c5f00008e5f0000905f0000925f0000945f0000 + m_ExpandedIDs: 00000000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -389,7 +432,7 @@ MonoBehaviour: m_SelectedInstanceIDs: m_LastClickedInstanceID: 0 m_HadKeyboardFocusLastEvent: 0 - m_ExpandedInstanceIDs: c6230000 + m_ExpandedInstanceIDs: c62300005e6c0000f86a0000f4680000e6650000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -405,7 +448,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 0} + m_ClientGUIView: {fileID: 5} m_CreateAssetUtility: m_EndAction: {fileID: 0} m_InstanceID: 0 @@ -437,10 +480,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1102 - y: 171 - width: 229 - height: 424 + x: 1117 + y: 199 + width: 322 + height: 740 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -479,10 +522,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 364 - y: 171 - width: 181 - height: 243 + x: 72 + y: 199 + width: 257 + height: 427 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -491,9 +534,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: + m_SelectedIDs: de5f0000 m_LastClickedID: 0 - m_ExpandedIDs: 0efbffff + m_ExpandedIDs: 0cfbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -509,7 +552,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} + m_ClientGUIView: {fileID: 4} m_SearchString: m_ExpandedScenes: [] m_CurrenRootInstanceID: 0 @@ -537,10 +580,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 546 - y: 171 - width: 554 - height: 243 + x: 1802 + y: 92 + width: 1103 + height: 550 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -594,7 +637,7 @@ MonoBehaviour: floating: 0 collapsed: 0 displayed: 1 - snapOffset: {x: 0, y: 0} + snapOffset: {x: 0, y: 25} snapOffsetDelta: {x: 0, y: 0} snapCorner: 0 id: unity-transform-toolbar @@ -798,9 +841,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: 0, y: 0, z: 0} + m_Target: {x: 0.8157873, y: -0.016838798, z: -0.085324034} speed: 2 - m_Value: {x: 0.016069457, y: 0.05938372, z: -0.054735783} + m_Value: {x: 0.8157873, y: -0.016838798, z: -0.085324034} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -831,7 +874,7 @@ MonoBehaviour: m_Fade: m_Target: 0 speed: 2 - m_Value: 1 + m_Value: 0 m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} m_Pivot: {x: 0, y: 0, z: 0} m_Size: {x: 1, y: 1} @@ -851,9 +894,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 10 + m_Target: 5.977448 speed: 2 - m_Value: 5.678701 + m_Value: 5.977448 m_Ortho: m_Target: 1 speed: 2 @@ -898,10 +941,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 507 - y: 94 - width: 1532 - height: 790 + x: 330 + y: 199 + width: 785 + height: 427 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -913,25 +956,25 @@ MonoBehaviour: m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 1532, y: 769} + m_TargetSize: {x: 1920, y: 1080} m_TextureFilterMode: 0 m_TextureHideFlags: 61 - m_RenderIMGUI: 0 + m_RenderIMGUI: 1 m_EnterPlayModeBehavior: 0 m_UseMipMap: 0 m_VSyncEnabled: 0 m_Gizmos: 0 m_Stats: 0 - m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_SelectedSizes: 03000000000000000000000000000000000000000000000000000000000000000000000000000000 m_ZoomArea: m_HRangeLocked: 0 m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -766 - m_HBaseRangeMax: 766 - m_VBaseRangeMin: -384.5 - m_VBaseRangeMax: 384.5 + m_HBaseRangeMin: -960 + m_HBaseRangeMax: 960 + m_VBaseRangeMin: -540 + m_VBaseRangeMax: 540 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -949,23 +992,23 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 1532 - height: 769 - m_Scale: {x: 1, y: 1} - m_Translation: {x: 766, y: 384.5} + width: 785 + height: 406 + m_Scale: {x: 0.37592593, y: 0.37592593} + m_Translation: {x: 392.5, y: 203} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -766 - y: -384.5 - width: 1532 - height: 769 + x: -1044.0886 + y: -540 + width: 2088.1772 + height: 1080 m_MinimalGUI: 1 - m_defaultScale: 1 - m_LastWindowPixelSize: {x: 1532, y: 790} + m_defaultScale: 0.37592593 + m_LastWindowPixelSize: {x: 785, y: 427} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 @@ -991,10 +1034,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 2249 - y: 726.5 - width: 920 - height: 250 + x: 0 + y: 629 + width: 1465 + height: 362 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default From 0516876667ed976670e1045fee180edd67f0cdb5 Mon Sep 17 00:00:00 2001 From: Johann Daflon Date: Thu, 15 Jun 2023 20:06:30 -0300 Subject: [PATCH 09/13] Revert "Merge branch 'main' into CG-181" This reverts commit 1e4ec0746e52b3a1cca0d1bb7b38491c4083ae5f, reversing changes made to 08029f5eae08d06a32ceb0f19220a34fd6a8b89a. --- chess-game-project/Assets/Scripts/AI.cs | 363 ------------------ chess-game-project/Assets/Scripts/Chessman.cs | 259 +------------ chess-game-project/Assets/Scripts/Game.cs | 107 ------ .../Assets/Scripts/MovePlate.cs | 11 +- .../Scripts/Tests/PlayMode/MovementTest.cs | 70 ---- 5 files changed, 9 insertions(+), 801 deletions(-) delete mode 100644 chess-game-project/Assets/Scripts/AI.cs diff --git a/chess-game-project/Assets/Scripts/AI.cs b/chess-game-project/Assets/Scripts/AI.cs deleted file mode 100644 index 3d116cb..0000000 --- a/chess-game-project/Assets/Scripts/AI.cs +++ /dev/null @@ -1,363 +0,0 @@ -using System; -using System.Collections.Generic; - -public class Move { - public int x; - public int y; - public int destX; - public int destY; - public int score; - public bool attack; - public Move(int _x, int _y, int _destX, int _destY) - { - Board board = new Board(); - // if (!board.VerifyInsideBoard(_destX, _destX) || !board.VerifyInsideBoard(_x, _y)) - // { - // throw new Exception("Jogada " + _destX + _destY + "está fora do tabuleiro"); - // } - x = _x; - y = _y; - destX = _destX; - destY = _destY; - score = 0; - attack = false; - } - public Move(int _x, int _y, int _destX, int _destY, int _score){ - Board board = new Board(); - // if (!board.VerifyInsideBoard(_destX, _destX) || !board.VerifyInsideBoard(_x, _y)) - // { - // throw new Exception("Jogada " + _destX + _destY + "está fora do tabuleiro"); - // } - x = _x; - y = _y; - destX = _destX; - destY = _destY; - score = _score; - attack = true; - } - static public Move Fake(){ - return new Move(0,0,0,0,-9999); - } -} - -public class Piece { - public int enabled = 1; - public int type; - public int team; - public int x; - public int y; - public Piece(int _type, int _team, int _x, int _y){ - type = _type; - team = _team; - x = _x; - y = _y; - } - public int TypeToScore(){ - return this.type+1; - } - public Move[] Movement(Board board){ - switch(type){ - case 0: return this.pawn(board); // Peao - case 1: return this.L(board); // Cavalo - case 2: return this.cross(board); // Bispo - case 3: return this.Plus(board); // Castelo - case 4: return this.Queen(board); // Rainha - } - return this.adj(board); // Rei - } - public Move[] Queen(Board board){ - Move[] x = this.cross(board); - Move[] y = this.Plus(board); - Move[] z = new Move[x.Length + y.Length]; - x.CopyTo(z, 0); - y.CopyTo(z, x.Length); - return z; - } - // 4 straight lines - public Move[] Plus(Board board){ - Piece piece = this; - List moves = new List(); - int x = piece.x; - int y = piece.y; - for(int i = x + 1; i < 8; i++){ - if (!board.VerifyInsideBoard(i, y)) continue; - if(board.GetPiece(i, y) == null){ - moves.Add(new Move(x,y, i,y)); - }else{ - if(board.GetPiece(i, y).team != piece.team){ - moves.Add(new Move(x,y, i,y, (board.GetPiece(i, y)).TypeToScore())); - } - break; - } - } - - for(int i = x - 1; i >= 0; i--){ - if (!board.VerifyInsideBoard(i, y)) continue; - if(board.GetPiece(i, y) == null){ - moves.Add(new Move(x,y, i,y)); - }else{ - if(board.GetPiece(i, y).team != piece.team){ - moves.Add(new Move(x,y, i,y, (board.GetPiece(i, y)).TypeToScore())); - } - break; - } - } - - for(int i = y + 1; i < 8; i++){ - if (!board.VerifyInsideBoard(x, i)) continue; - if(board.GetPiece(x, i) == null){ - moves.Add(new Move(x,y, x,i)); - }else{ - if(board.GetPiece(x, i).team != piece.team){ - moves.Add(new Move(x,y, x,i, (board.GetPiece(x, i)).TypeToScore())); - } - break; - } - } - - for(int i = y - 1; i >= 0; i--){ - if (!board.VerifyInsideBoard(x, i)) continue; - if(board.GetPiece(x, i) == null){ - moves.Add(new Move(x,y, x,i)); - }else{ - if(board.GetPiece(x, i).team != piece.team){ - moves.Add(new Move(x,y, x,i, (board.GetPiece(x, i)).TypeToScore())); - } - break; - } - } - - return moves.ToArray(); - } - // 4 diagonals - public Move[] cross(Board board){ - Piece piece = this; - List moves = new List(); - int x = piece.x; - int y = piece.y; - for(int i = 1; (i+x < 8) && (i+y < 8); i++){ - if (!board.VerifyInsideBoard(x + i, y + i)) continue; - if(board.GetPiece(x+i, y+i) == null){ - moves.Add(new Move(x,y, x+i, y+i)); - }else{ - if(board.GetPiece(x+i, y+i).team != piece.team){ - moves.Add(new Move(x,y, x+i,y+i, (board.GetPiece(x+i,y+i)).TypeToScore())); - } - break; - } - } - - for(int i = -1; (i+x >= 0) && (i+y >= 0); i--){ - if (!board.VerifyInsideBoard(x + i, y + i)) continue; - if(board.GetPiece(x+i, y+i) == null){ - moves.Add(new Move(x,y, x+i, y+i)); - }else{ - if(board.GetPiece(x+i, y+i).team != piece.team){ - moves.Add(new Move(x,y, x+i,y+i, (board.GetPiece(x+i,y+i)).TypeToScore())); - } - break; - } - } - - for(int i = 1; (i+x < 8) && (i-y >= 0); i++){ - if (!board.VerifyInsideBoard(x + i, i - y)) continue; - if(board.GetPiece(x+i, i-y) == null){ - moves.Add(new Move(x,y, x+i, i-y)); - }else{ - if(board.GetPiece(x+i, i-y).team != piece.team){ - moves.Add(new Move(x,y, x+i,i-y, (board.GetPiece(x+i,i-y)).TypeToScore())); - } - break; - } - } - - for(int i = 1; (i-x >= 0) && (i+y < 8); i++){ - if (!board.VerifyInsideBoard(i - x, y + 1)) continue; - if(board.GetPiece(i-x, y+i) == null){ - moves.Add(new Move(x,y, i-x, y+i)); - }else{ - if(board.GetPiece(i-x, y+i).team != piece.team){ - moves.Add(new Move(x,y, i-x,y+i, (board.GetPiece(i-x,y+i)).TypeToScore())); - } - break; - } - } - - return moves.ToArray(); - } - // Adjacent squares - public Move[] adj(Board board){ - Piece piece = this; - Piece target; - List moves = new List(); - int x = piece.x; - int y = piece.y; - for(int i = -1; i <= 1; i+=2){ - if (!board.VerifyInsideBoard(piece.x + i, piece.y)) continue; - target = board.GetPiece(x+i, y); - if(target == null){ - moves.Add(new Move(x,y, x+i, y)); - }else if(target.team != piece.team){ - moves.Add(new Move(x,y, x+i,y, target.TypeToScore())); - } - } - for(int i = -1; i <= 1; i+=2){ - if (!board.VerifyInsideBoard(piece.x, piece.y + i)) continue; - target = board.GetPiece(x, y+i); - if(target == null){ - moves.Add(new Move(x,y, x,y+i)); - }else if(target.team != piece.team){ - moves.Add(new Move(x,y, x,y+i, target.TypeToScore())); - } - } - - for(int i = -1; i <= 1; i+=2){ - for(int z = -1; z <= 1; z+=2){ - if (!board.VerifyInsideBoard(piece.x, piece.y + i)) continue; - target = board.GetPiece(x, y+i); - if(target == null){ - moves.Add(new Move(x,y, x+i, y+z)); - }else if(target.team != piece.team){ - moves.Add(new Move(x,y, x+i, y+z, target.TypeToScore())); - } - } - } - return moves.ToArray(); - } - // Adjacent squares - public Move[] pawn(Board board){ - Piece piece = this; - Piece target; - List moves = new List(); - - int firstMove = 0; - int delta = 0; - if(piece.team == 0){delta = 1;if(piece.y == 1){firstMove = 1;}} - if(piece.team == 1){delta = -1;if(piece.y == 6){firstMove = 1;}} - if(board.VerifyInsideBoard(piece.x, piece.y + delta)) - { - if (board.GetPiece(piece.x, piece.y + delta) == null) - { - // Na teoria, o peão nunca estaria no topo - moves.Add(new Move(piece.x, piece.y, piece.x, piece.y + delta)); - if (firstMove == 1) - { - if (board.GetPiece(piece.x, piece.y + delta * 2) == null) - { - // Só vale pra casa inicial - moves.Add(new Move(piece.x, piece.y, piece.x, piece.y + delta*2)); - } - } - } - } - for(int ii = -1; ii <= 1; ii+=2) - { - if (!board.VerifyInsideBoard(piece.x + ii, piece.y + delta)) continue; - target = board.GetPiece(piece.x + ii, piece.y + delta); - if(target != null && target.team != this.team){ - moves.Add(new Move(piece.x, piece.y, piece.x + ii, piece.y + delta, target.TypeToScore())); - } - } - return moves.ToArray(); - } - public Move[] L(Board board){ - Piece piece = this; - List moves = new List(); - Piece target; - int x = piece.x; - int y = piece.y; - for(int i = -1; i <= 1; i+=2){ // Invert Y - for(int z = 0; z <= 1; z++){ // Change x and y sizes - for(int w = -1; w <= 1; w+=2){ // Invert x - x = (1+z)*w; - y = (2-z)*i; - if (!board.VerifyInsideBoard(piece.x + x, piece.y + y)) continue; - target = board.GetPiece(piece.x + x,piece.y + y); - if(target == null){ - moves.Add(new Move(piece.x,piece.y, piece.x+x, piece.y+y)); - }else if(target.team != piece.team){ - moves.Add(new Move(piece.x,piece.y, piece.x+x, piece.y+y, target.TypeToScore())); - } - } - } - } - return moves.ToArray(); - } -} -public class Board { - public Piece[,] positions = new Piece[8,8]; - private int w = 0; - public Piece[] wPieces = new Piece[16]; - private int b = 0; - public Piece[] bPieces = new Piece[16]; - public void AddPiece(int type, int team, int x, int y){ - Piece p = new Piece(type, team, x, y); - positions[x, y] = p; - if(team == 0){ - wPieces[w] = p; - w+=1; - }else{ - bPieces[b] = p; - b+=1; - } - } - - public Piece[] GetPieces(int turn) { - List resp = new List(); - if(turn == 0){ - foreach (var p in wPieces) - { - if(p != null && p.enabled == 1){resp.Add(p);} - } - return resp.ToArray(); - }else{ - foreach (var p in bPieces) - { - if(p != null && p.enabled == 1){resp.Add(p);} - } - return resp.ToArray(); - } - } - public Piece GetPiece(int x, int y){ - return this.positions[x,y]; - } - public void SetPiece(int x, int y, Piece p){ - this.positions[x,y] = p; - } - - public bool VerifyInsideBoard(int x, int y) - { - if ((x < 0 || x > 7) || (y < 0 || y > 7)) - return false; - return true; - } - public void _move(Move _move){ - Move(_move.x, _move.y, _move.destX, _move.destY); - } - public void _rMove(Move _move){ - Move(_move.destX, _move.destY, _move.x, _move.y); - } - public void Move(int x, int y, int xd, int yd){ - positions[x,y].x = xd; - positions[x,y].y = yd; - positions[xd,yd] = this.positions[x,y]; - positions[x,y] = null; - } -} -public class AI { - public static Move RandomChoice(Board board, int turn) - { - List pieces = new List(); - foreach (var piece in board.GetPieces(turn)) - { - if(piece.Movement(board).Length > 0) - pieces.Add(piece); - } - Random r = new Random(); - int index = r.Next(pieces.Count); - Move[] movePiece = pieces[index].Movement(board); - index = r.Next(movePiece.Length); - - return movePiece[index]; - } -} diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index 68b5774..a6fb01b 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -131,16 +131,6 @@ public void SetYBoard(int y) { yBoard = y; } - - public string GetName() - { - return this.name; - } - - public string GetPlayer() - { - return this.player; - } public string GetPlayer() { @@ -162,33 +152,14 @@ public Sprite GetBlackQueen() */ private void OnMouseUp() { - if( player == "black") + // Só habilita a jogada se o for a vez do jogador da peça selecionada + if (!controller.GetComponent().IsGameOver() && controller.GetComponent().GetCurrentPlayer() == player) { - // Só habilita a jogada se o for a vez do jogador da peça selecionada - if (!controller.GetComponent().IsGameOver() && controller.GetComponent().GetCurrentPlayer() == player && !controller.GetComponent().IsBlackIa()) - { - // Apaga os moveplates que estão no tabuleiro. - DestroyMovePlates(); + // Apaga os moveplates que estão no tabuleiro. + DestroyMovePlates(); - // Inicia os novos moveplates depedendo da interação. - InitiateMovePlates(); - } - else if (!controller.GetComponent().IsGameOver() && controller.GetComponent().GetCurrentPlayer() == player && controller.GetComponent().IsBlackIa()) - { - // Quando for a vez do preto e ele ser a IA do jogo. - AIMove(); - } - } - else - { - if (!controller.GetComponent().IsGameOver() && controller.GetComponent().GetCurrentPlayer() == player) - { - // Apaga os moveplates que estão no tabuleiro. - DestroyMovePlates(); - - // Inicia os novos moveplates depedendo da interação. - InitiateMovePlates(); - } + // Inicia os novos moveplates depedendo da interação. + InitiateMovePlates(); } } @@ -297,9 +268,7 @@ public void PawnMovePlate(int x, int y) if (sc.GetPosition(x, y) == null) { MovePlateSpawn(x, y); - if ((sc.GetPosition(x, y + 1) == null)){ - MovePlateSpawn(x, y + 1); - } + MovePlateSpawn(x, y + 1); } } else if (sc.GetCurrentPlayer() == "black" && y == 5) @@ -307,9 +276,7 @@ public void PawnMovePlate(int x, int y) if (sc.GetPosition(x, y) == null) { MovePlateSpawn(x, y); - if ((sc.GetPosition(x, y - 1) == null)){ - MovePlateSpawn(x, y - 1); - } + MovePlateSpawn(x, y - 1); } } else if (sc.GetCurrentPlayer() == "white") @@ -431,216 +398,6 @@ public void MovePlateSpawn(int matrixX, int matrixY, bool attack = false, bool p mpScript.SetReference(gameObject); mpScript.SetCoordinates(matrixX, matrixY); } - - public void MovePlateIaSpawn(int matrixX, int matrixY, GameObject gc, bool attack) - { - // Recupera o valor do tabuleiro para converter em xy coordenadas - float x = matrixX; - float y = matrixY; - - // Ajuste do offset para ficar de acordo com uma matrix 8x8 - x *= 0.95f; - y *= 0.95f; - - x -= 3.32f; - y -= 2.99f; - - // Cria o gameobject do moveplate - GameObject mp = Instantiate(movePlate, new Vector3(x, y, -3.0f), Quaternion.identity); - // Cria uma instância do moveplate e interage com essa instância, flag attack = true. - MovePlate mpScript = mp.GetComponent(); - mpScript.attack = attack; - mpScript.SetReference(gc); - mpScript.SetCoordinates(matrixX, matrixY); ; - mpScript.OnMouseUp(); - } - - private Piece[] SetWhitePieces(GameObject[] whitePieces) - { - Piece[] wps = new Piece[16]; - int i = 0; - foreach (var whitePiece in whitePieces) - { - if (whitePiece == null) continue; - - Chessman gc = whitePiece.GetComponent(); - int pieceTeam = 0; - int pieceType = 0; - switch (gc.GetName()) - { - case "whitePawn": - pieceType = 0; - break; - case "whiteKnight": - pieceType = 1; - break; - case "whiteBishop": - pieceType = 2; - break; - case "whiteTower": - pieceType = 3; - break; - case "whiteQueen": - pieceType = 4; - break; - case "whiteKing": - pieceType = 5; - break; - } - - wps[i] = new Piece(pieceType, pieceTeam, gc.GetXBoard(), gc.GetYBoard()); - i++; - } - - - return wps; - } - - private Piece[] SetBlackPieces(GameObject[] blackPieces) - { - Piece[] bps = new Piece[16]; - int i = 0; - foreach (var blackPiece in blackPieces) - { - if (blackPiece == null) continue; - Chessman gc = blackPiece.GetComponent(); - int pieceTeam = 1; - int pieceType = 0; - switch (gc.GetName()) - { - case "blackPawn": - pieceType = 0; - break; - case "blackKnight": - pieceType = 1; - break; - case "blackBishop": - pieceType = 2; - break; - case "blackTower": - pieceType = 3; - break; - case "blackQueen": - pieceType = 4; - break; - case "blackKing": - pieceType = 5; - break; - } - - bps[i] = new Piece(pieceType, pieceTeam, gc.GetXBoard(), gc.GetYBoard()); - i++; - } - - - return bps; - } - - private Piece[,] SetPiecesPosition(GameObject[] whitePieces, GameObject[] blackPieces) - { - Piece[,] pieces = new Piece[8,8]; - foreach (var whitePiece in whitePieces) - { - if (whitePiece == null) continue; - Chessman gc = whitePiece.GetComponent(); - int pieceTeam = 0; - int pieceType = 0; - switch (gc.GetName()) - { - case "whitePawn": - pieceType = 0; - break; - case "whiteKnight": - pieceType = 1; - break; - case "whiteBishop": - pieceType = 2; - break; - case "whiteTower": - pieceType = 3; - break; - case "whiteQueen": - pieceType = 4; - break; - case "whiteKing": - pieceType = 5; - break; - } - - pieces[gc.GetXBoard(), gc.GetYBoard()] = new Piece(pieceType, pieceTeam, gc.GetXBoard(), gc.GetYBoard()); - } - foreach (var blackPiece in blackPieces) - { - if (blackPiece == null) continue; - Chessman gc = blackPiece.GetComponent(); - int pieceTeam = 1; - int pieceType = 0; - switch (gc.GetName()) - { - case "blackPawn": - pieceType = 0; - break; - case "blackKnight": - pieceType = 1; - break; - case "blackBishop": - pieceType = 2; - break; - case "blackTower": - pieceType = 3; - break; - case "blackQueen": - pieceType = 4; - break; - case "blackKing": - pieceType = 5; - break; - } - - pieces[gc.GetXBoard(), gc.GetYBoard()] = new Piece(pieceType, pieceTeam, gc.GetXBoard(), gc.GetYBoard()); - } - - return pieces; - } - - private Board SetBoard(Piece[,] pieces, Piece[] whitePieces, Piece[] blackPieces) - { - Board board = new Board(); - - board.positions = pieces; - board.wPieces = whitePieces; - board.bPieces = blackPieces; - - return board; - } - - public void AIMove() - { - GameObject[] whitePieces = controller.GetComponent().GetWhitePlayer(); - GameObject[] blackPieces = controller.GetComponent().GetBlackPlayer(); - - Piece[,] pieces = SetPiecesPosition(whitePieces, blackPieces); - Piece[] wPs = SetWhitePieces(whitePieces); - Piece[] bPs = SetBlackPieces(blackPieces); - Board board = SetBoard(pieces, wPs, bPs); - int currentPlayer = 0; - - if (controller.GetComponent().GetCurrentPlayer() == "white") - currentPlayer = 0; - else - currentPlayer = 1; - - Move move = AI.RandomChoice(board, currentPlayer); - - int xAtual = move.x; - int yAtual = move.y; - int xDest = move.destX; - int yDest = move.destY; - bool attack = move.attack; - - GameObject gc = controller.GetComponent().GetPosition(xAtual, yAtual); - MovePlateIaSpawn(xDest, yDest, gc, attack); - } public void CallOnMouseUp() { diff --git a/chess-game-project/Assets/Scripts/Game.cs b/chess-game-project/Assets/Scripts/Game.cs index caf448d..bfec095 100644 --- a/chess-game-project/Assets/Scripts/Game.cs +++ b/chess-game-project/Assets/Scripts/Game.cs @@ -18,8 +18,6 @@ public class Game : MonoBehaviour private string currentPlayer = "white"; private bool gameOver = false; - private bool blackIa = true; - private bool whiteIa = false; // Start is called before the first frame update public void Start() @@ -79,49 +77,6 @@ public void SetPosition(GameObject obj) positions[chessman.GetXBoard(), chessman.GetYBoard()] = obj; } - - public void SearchAndDestroy(GameObject cp) - { - if (cp.GetComponent().GetPlayer() == "white") - { - for (var i = 0; i < whitePlayer.Length; i++) - { - if (whitePlayer[i] == null || whitePlayer[i].Equals(cp)) - { - whitePlayer[i] = null; - break; - } - } - } - else - { - for (var i = 0; i < blackPlayer.Length; i++) - { - if (blackPlayer[i] == cp) - { - blackPlayer[i] = null; - break; - } - } - } - } - - public GameObject[,] GetPositions() - { - return positions; - } - - public GameObject[] GetWhitePlayer() - { - return whitePlayer; - } - - public GameObject[] GetBlackPlayer() - { - return blackPlayer; - } - - public GameObject GetPosition(int x, int y) { return positions[x, y]; @@ -150,16 +105,6 @@ public string GetCurrentPlayer() { return currentPlayer; } - - public bool IsBlackIa() - { - return blackIa; - } - - public bool IsWhiteIa() - { - return whiteIa; - } public bool IsGameOver() { @@ -188,52 +133,6 @@ public void Update() SceneManager.LoadScene("Game"); } } - - public void AppendDestroyedPieces(GameObject cp) - { - if (cp.GetComponent().GetPlayer() == "white") - { - for (int i = 1; i >= 0 ; i--) - { - for (int j = 0; j < 8; j++) - { - if (destroyedPieces[i, j] == null) - { - destroyedPieces[i, j] = cp; - return; - } - } - } - } - else - { - for (int i = 2; i < 4; i++) - { - for (int j = 0; j < 8; j++) - { - if (destroyedPieces[i, j] == null) - { - destroyedPieces[i, j] = cp; - return; - } - } - } - } - } - - public (int i, int j) SearchDestroyedPieces(GameObject cp) - { - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 8; j++) - { - if (destroyedPieces[i, j] == cp) - return (i, j); - } - } - - return (-1, -1); - } public void AppendDestroyedPieces(GameObject cp) { @@ -284,12 +183,6 @@ public void AppendDestroyedPieces(GameObject cp) public void Winner(string playerWinner) { gameOver = true; - - var isTest = GameObject.FindGameObjectWithTag("EndText"); - if (isTest == null) - { - return; - } GameObject.FindGameObjectWithTag("EndText").GetComponent().enabled = true; GameObject.FindGameObjectWithTag("EndText").GetComponent().text = "O " + playerWinner + " venceu! Pressione o mouse para reiniciar"; diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index c40efc2..b0dae60 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -45,10 +45,7 @@ public void OnMouseUp() if(attack) { - - int i = 0; - int j = 0; - + int i, j; GameObject cp = controller.GetComponent().GetPosition(matrixX,matrixY); if (cp.name == "whiteKing") controller.GetComponent().Winner("preto"); @@ -64,12 +61,6 @@ public void OnMouseUp() controller.GetComponent().SerPositionSpriteEmpty(matrixX, matrixY); controller.GetComponent().SetPositionEmpty(matrixX, matrixY); //TODO move to side - - controller.GetComponent().SearchAndDestroy(cp); - - controller.GetComponent().SerPositionSpriteEmpty(matrixX, matrixY); - controller.GetComponent().SetPositionEmpty(matrixX, matrixY); - } controller.GetComponent().SetPositionEmpty(reference.GetComponent().GetXBoard(), reference.GetComponent().GetYBoard()); diff --git a/chess-game-project/Assets/Scripts/Tests/PlayMode/MovementTest.cs b/chess-game-project/Assets/Scripts/Tests/PlayMode/MovementTest.cs index fe46148..dc73b0a 100644 --- a/chess-game-project/Assets/Scripts/Tests/PlayMode/MovementTest.cs +++ b/chess-game-project/Assets/Scripts/Tests/PlayMode/MovementTest.cs @@ -373,74 +373,4 @@ public void Move_QueenKingToSelectedPositionAxis() Assert.AreEqual(chessman.GetYBoard(), 2); } - [Test] - public void Checkmate_Test() - { - //Peça branca e Rei Preto - Game game = GameObject.FindGameObjectWithTag("GameController").GetComponent(); - GameObject whiteChessPieceInstance = game.Create("whiteQueen", 3, 1); - GameObject blackKingChessPieceInstance = game.Create("blackKing", 4, 2); - game.SetPosition(whiteChessPieceInstance); - game.SetPosition(blackKingChessPieceInstance); - - Chessman chessman = whiteChessPieceInstance.GetComponent(); - - GameObject movePlatePrefab = new GameObject(); - movePlatePrefab.AddComponent(); - movePlatePrefab.AddComponent(); - chessman.movePlate = movePlatePrefab; - - // Cima - float x = 4 * 1.15f - 4f; - float y = 2 * 1.15f - 3.6f; - - GameObject movePlateInstance = Chessman.Instantiate(chessman.movePlate, new Vector3(x, y, -3.0f), Quaternion.identity); - MovePlate movePlate = movePlateInstance.GetComponent(); - movePlate.SetReference(whiteChessPieceInstance); - movePlate.SetCoordinates(4, 2); - movePlate.attack = true; - - movePlate.OnMouseUp(); - - Assert.IsNull(game.GetPosition(3, 1)); - Assert.AreSame(game.GetPosition(4, 2), whiteChessPieceInstance); - } - - [Test] - public void RedMoveplate_Test() - { - //Peça branca e Rei Preto - Game game = GameObject.FindGameObjectWithTag("GameController").GetComponent(); - GameObject whiteChessPieceInstance = game.Create("whiteQueen", 3, 1); - GameObject blackKingChessPieceInstance = game.Create("blackKing", 4, 2); - game.SetPosition(whiteChessPieceInstance); - game.SetPosition(blackKingChessPieceInstance); - - Chessman chessman = whiteChessPieceInstance.GetComponent(); - - GameObject movePlatePrefab = new GameObject(); - movePlatePrefab.AddComponent(); - movePlatePrefab.AddComponent(); - chessman.movePlate = movePlatePrefab; - - // Cima - float x = 4 * 1.15f - 4f; - float y = 2 * 1.15f - 3.6f; - - GameObject movePlateInstance = Chessman.Instantiate(chessman.movePlate, new Vector3(x, y, -3.0f), Quaternion.identity); - MovePlate movePlate = movePlateInstance.GetComponent(); - movePlate.SetReference(whiteChessPieceInstance); - movePlate.SetCoordinates(4, 2); - movePlate.attack = true; - - movePlate.Start(); - - var color = movePlate.GetComponent().color; - var black = new Color(0.0f, 0.0f, 0.0f, 1.0f); - var red = new Color(1.0f, 0.0f, 0.0f, 1.0f); - - Assert.AreEqual(color, red); - Assert.AreNotEqual(color, black); - } - } From 806acf64189141430e5159928da024aec0c36954 Mon Sep 17 00:00:00 2001 From: Johann Daflon Date: Thu, 15 Jun 2023 20:24:03 -0300 Subject: [PATCH 10/13] Menu Promo Feito com Dialog Box do editor do Unity --- chess-game-project/Assets/Scripts/Chessman.cs | 31 +++++++ .../Assets/Scripts/MovePlate.cs | 92 ++++++++++++++++++- 2 files changed, 119 insertions(+), 4 deletions(-) diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index a6fb01b..861ae74 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -141,11 +141,42 @@ public Sprite GetWhiteQueen() { return whiteQueen[setID]; } + + public Sprite GetWhiteTower() + { + return whiteTower[setID]; + } + + public Sprite GetWhiteBishop() + { + return whiteBishop[setID]; + } + + public Sprite GetWhiteKnight() + { + return whiteKnight[setID]; + } + public Sprite GetBlackQueen() { return blackQueen[setID]; } + public Sprite GetBlackTower() + { + return blackTower[setID]; + } + + public Sprite GetBlackBishop() + { + return blackBishop[setID]; + } + + public Sprite GetBlackKnight() + { + return blackKnight[setID]; + } + /* Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. Nesse caso, essa OnMouseUp é responsável pelo desenho dos moveplates. diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index b0dae60..df31154 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEditor; public class MovePlate : MonoBehaviour { @@ -34,6 +35,52 @@ public void Start() } } + public static PieceType ShowPromotionMenu() + { + PieceType selectedPiece = PieceType.Queen; + bool promote = true; + + if (promote) + { + bool queen = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Rainha", "Torre"); + if (queen) + { + selectedPiece = PieceType.Queen; + } + else + { + bool tower = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Torre", "Bispo"); + if (tower) + { + selectedPiece = PieceType.Tower; + } + else + { + bool bishop = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Bispo", "Cavalo"); + if (bishop) + { + selectedPiece = PieceType.Bishop; + } + else + { + selectedPiece = PieceType.Knight; + } + } + } + } + + return selectedPiece; + } + + + public enum PieceType + { + Queen, + Tower, + Bishop, + Knight + } + /* Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. Nesse caso, essa OnMouseUp é responsável pela troca de um moveplate com a peça @@ -71,16 +118,53 @@ public void OnMouseUp() if (promote) { + PieceType promocao = ShowPromotionMenu(); GameObject cp = controller.GetComponent().GetPosition(matrixX, matrixY); if (matrixY == 7) { - cp.name = "whiteQueen"; - cp.GetComponent().sprite = reference.GetComponent().GetWhiteQueen(); + if (promocao == PieceType.Tower) + { + cp.name = "whiteTower"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteTower(); + } + if (promocao == PieceType.Queen) + { + cp.name = "whiteQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteQueen(); + } + if (promocao == PieceType.Bishop) + { + cp.name = "whiteBishop"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteBishop(); + } + if (promocao == PieceType.Knight) + { + cp.name = "whiteKnight"; + cp.GetComponent().sprite = reference.GetComponent().GetWhiteKnight(); + } } else { - cp.name = "blackQueen"; - cp.GetComponent().sprite = reference.GetComponent().GetBlackQueen(); + if (promocao == PieceType.Tower) + { + cp.name = "blackTower"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackTower(); + } + if (promocao == PieceType.Queen) + { + cp.name = "blackQueen"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackQueen(); + } + if (promocao == PieceType.Bishop) + { + cp.name = "blackBishop"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackBishop(); + } + if (promocao == PieceType.Knight) + { + cp.name = "blackKnight"; + cp.GetComponent().sprite = reference.GetComponent().GetBlackKnight(); + } } } //Alterna o jogador atual From f86026d50081f7cc0e6eb4896c848d668094680a Mon Sep 17 00:00:00 2001 From: Johann Daflon Date: Fri, 23 Jun 2023 21:25:50 -0300 Subject: [PATCH 11/13] MenuPromo Refatorado MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agora utiliza corretamente a UI. O Menu é sempre ativo e para promover tem que clicar na escolha antes de clicar no peão --- .../Assets/Objects/MovePlate.prefab | 4 + chess-game-project/Assets/Scenes/Game.unity | 1349 ++++++++++++++++- chess-game-project/Assets/Scripts/Chessman.cs | 3 +- .../Assets/Scripts/MovePlate.cs | 77 +- .../ProjectSettings/TagManager.asset | 1 + .../UserSettings/EditorUserSettings.asset | 4 +- .../UserSettings/Layouts/default-2021.dwlt | 225 ++- 7 files changed, 1450 insertions(+), 213 deletions(-) diff --git a/chess-game-project/Assets/Objects/MovePlate.prefab b/chess-game-project/Assets/Objects/MovePlate.prefab index 0194c24..9d62a46 100644 --- a/chess-game-project/Assets/Objects/MovePlate.prefab +++ b/chess-game-project/Assets/Objects/MovePlate.prefab @@ -100,6 +100,10 @@ MonoBehaviour: m_EditorClassIdentifier: controller: {fileID: 0} attack: 0 + promote: 0 + pecaPromo: Tower + painel: {fileID: 0} + isMenuOpen: 0 --- !u!61 &3764326649180860259 BoxCollider2D: m_ObjectHideFlags: 0 diff --git a/chess-game-project/Assets/Scenes/Game.unity b/chess-game-project/Assets/Scenes/Game.unity index 231219d..83f2a08 100644 --- a/chess-game-project/Assets/Scenes/Game.unity +++ b/chess-game-project/Assets/Scenes/Game.unity @@ -123,6 +123,490 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &190511028 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 190511029} + - component: {fileID: 190511031} + - component: {fileID: 190511030} + m_Layer: 5 + m_Name: PromoText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &190511029 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 190511028} + 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: 493770860} + m_RootOrder: 4 + 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: -0.46, y: 175.98} + m_SizeDelta: {x: 435.52, y: 100.52} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &190511030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 190511028} + m_Enabled: 1 + 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: "Se for promover, escolha a pe\xE7a antes:" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 1 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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: -15.257469, y: 0, z: -25.93763, 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 &190511031 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 190511028} + m_CullTransparentMesh: 1 +--- !u!1 &478892076 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 478892077} + - component: {fileID: 478892080} + - component: {fileID: 478892079} + - component: {fileID: 478892078} + m_Layer: 5 + m_Name: Queen + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &478892077 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 478892076} + 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: + - {fileID: 1627351291} + m_Father: {fileID: 493770860} + m_RootOrder: 0 + 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: 5.23, y: 49.5} + m_SizeDelta: {x: 298.35, y: 60.31} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &478892078 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 478892076} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 478892079} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -7192434741991543191, guid: 715b9167f3bcc58449a4c119ca437a90, type: 3} + m_TargetAssemblyTypeName: MovePlate, Scripts + m_MethodName: PromoteToQueen + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &478892079 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 478892076} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &478892080 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 478892076} + m_CullTransparentMesh: 1 +--- !u!1 &491666636 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 491666637} + - component: {fileID: 491666640} + - component: {fileID: 491666639} + - component: {fileID: 491666638} + m_Layer: 5 + m_Name: Bishop + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &491666637 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491666636} + 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: + - {fileID: 1222195114} + m_Father: {fileID: 493770860} + m_RootOrder: 1 + 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: 5.23, y: -30.92} + m_SizeDelta: {x: 298.35, y: 60.31} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &491666638 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491666636} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 491666639} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -7192434741991543191, guid: 715b9167f3bcc58449a4c119ca437a90, type: 3} + m_TargetAssemblyTypeName: MovePlate, Scripts + m_MethodName: PromoteToBishop + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &491666639 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491666636} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &491666640 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 491666636} + m_CullTransparentMesh: 1 +--- !u!1 &493770859 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 493770860} + - component: {fileID: 493770863} + - component: {fileID: 493770862} + m_Layer: 5 + m_Name: Panel + m_TagString: Panel + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &493770860 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 493770859} + 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: + - {fileID: 478892077} + - {fileID: 491666637} + - {fileID: 606803062} + - {fileID: 1220784191} + - {fileID: 190511029} + m_Father: {fileID: 1261937589} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 680.58, y: 276.42} + m_SizeDelta: {x: -1427.37, y: -578.35} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &493770862 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 493770859} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + 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: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &493770863 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 493770859} + m_CullTransparentMesh: 1 --- !u!1 &519420028 GameObject: m_ObjectHideFlags: 0 @@ -287,6 +771,140 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 584682953} m_CullTransparentMesh: 1 +--- !u!1 &606803061 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 606803062} + - component: {fileID: 606803065} + - component: {fileID: 606803064} + - component: {fileID: 606803063} + m_Layer: 5 + m_Name: Tower + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &606803062 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606803061} + 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: + - {fileID: 2014358421} + m_Father: {fileID: 493770860} + m_RootOrder: 2 + 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: 5.23, y: -111.35} + m_SizeDelta: {x: 298.35, y: 60.31} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &606803063 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606803061} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 606803064} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -7192434741991543191, guid: 715b9167f3bcc58449a4c119ca437a90, type: 3} + m_TargetAssemblyTypeName: MovePlate, Scripts + m_MethodName: PromoteToTower + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &606803064 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606803061} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &606803065 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 606803061} + m_CullTransparentMesh: 1 --- !u!1 &848132681 GameObject: m_ObjectHideFlags: 0 @@ -362,55 +980,190 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 1261937589} - m_RootOrder: 1 + m_Father: {fileID: 1261937589} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.23952085, y: 0.6254073} + m_AnchorMax: {x: 0.76100004, y: 0.95000005} + m_AnchoredPosition: {x: 0.1800232, y: 1.3099976} + m_SizeDelta: {x: -4.730011, y: -5.1900024} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1085988844 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085988842} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 80 + m_FontStyle: 3 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 80 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Game Over, aperte para sair. +--- !u!222 &1085988845 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1085988842} + m_CullTransparentMesh: 1 +--- !u!1 &1096132976 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1096132977} + - component: {fileID: 1096132979} + - component: {fileID: 1096132978} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1096132977 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1096132976} + 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: 1220784191} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.23952085, y: 0.6254073} - m_AnchorMax: {x: 0.76100004, y: 0.95000005} - m_AnchoredPosition: {x: 0.1800232, y: 1.3099976} - m_SizeDelta: {x: -4.730011, y: -5.1900024} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1085988844 +--- !u!114 &1096132978 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085988842} - m_Enabled: 0 + m_GameObject: {fileID: 1096132976} + m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 1} + 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_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 80 - m_FontStyle: 3 - m_BestFit: 0 - m_MinSize: 4 - m_MaxSize: 80 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Game Over, aperte para sair. ---- !u!222 &1085988845 + m_text: Cavalo + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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 &1096132979 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085988842} + m_GameObject: {fileID: 1096132976} m_CullTransparentMesh: 1 --- !u!1 &1206968598 GameObject: @@ -523,6 +1276,275 @@ MonoBehaviour: - {fileID: 21300000, guid: 2e95eda1ff934164db5526ecabd5da7a, type: 3} - {fileID: 21300000, guid: 044d6e38a893bff4c9444b5a4b0db091, type: 3} - {fileID: 21300000, guid: d0024b839053f92459d1bf3a6cbc2422, type: 3} +--- !u!1 &1220784190 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1220784191} + - component: {fileID: 1220784194} + - component: {fileID: 1220784193} + - component: {fileID: 1220784192} + m_Layer: 5 + m_Name: Knight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1220784191 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1220784190} + 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: + - {fileID: 1096132977} + m_Father: {fileID: 493770860} + m_RootOrder: 3 + 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: 5.23, y: -191.77} + m_SizeDelta: {x: 298.35, y: 60.31} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1220784192 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1220784190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1220784193} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: -7192434741991543191, guid: 715b9167f3bcc58449a4c119ca437a90, type: 3} + m_TargetAssemblyTypeName: MovePlate, Scripts + m_MethodName: PromoteToKnight + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1220784193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1220784190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &1220784194 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1220784190} + m_CullTransparentMesh: 1 +--- !u!1 &1222195113 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1222195114} + - component: {fileID: 1222195116} + - component: {fileID: 1222195115} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1222195114 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1222195113} + 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: 491666637} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1222195115 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1222195113} + m_Enabled: 1 + 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: Bispo + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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 &1222195116 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1222195113} + m_CullTransparentMesh: 1 --- !u!1 &1261937585 GameObject: m_ObjectHideFlags: 0 @@ -599,7 +1621,7 @@ Canvas: m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 + m_AdditionalShaderChannelsFlag: 25 m_SortingLayerID: 0 m_SortingOrder: 1 m_TargetDisplay: 0 @@ -617,6 +1639,7 @@ RectTransform: m_Children: - {fileID: 584682954} - {fileID: 1085988843} + - {fileID: 493770860} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -736,6 +1759,276 @@ MonoBehaviour: - {fileID: 21300000, guid: 6eed6028af9d489498528a165c16d3da, type: 3} - {fileID: 21300000, guid: b73bbb6d77d918e42b8c2747cd5e0072, type: 3} - {fileID: 21300000, guid: 8dc6ecd7b73c30b42a92a1b3def9b513, type: 3} +--- !u!1 &1627351290 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1627351291} + - component: {fileID: 1627351293} + - component: {fileID: 1627351292} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1627351291 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1627351290} + 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: 478892077} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1627351292 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1627351290} + m_Enabled: 1 + 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: Rainha + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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 &1627351293 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1627351290} + m_CullTransparentMesh: 1 +--- !u!1 &2014358420 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2014358421} + - component: {fileID: 2014358423} + - component: {fileID: 2014358422} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2014358421 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014358420} + 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: 606803062} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2014358422 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014358420} + m_Enabled: 1 + 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: Torre + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + 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 &2014358423 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014358420} + m_CullTransparentMesh: 1 --- !u!1 &2106842907 GameObject: m_ObjectHideFlags: 0 diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index 861ae74..ac10bf1 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -10,6 +10,7 @@ public class Chessman : MonoBehaviour public GameObject controller; public GameObject movePlate; + // Posições private int xBoard = -1; private int yBoard = -1; @@ -425,7 +426,7 @@ public void MovePlateSpawn(int matrixX, int matrixY, bool attack = false, bool p MovePlate mpScript = mp.GetComponent(); mpScript.promote = promote; mpScript.attack = attack; - + mpScript.SetReference(gameObject); mpScript.SetCoordinates(matrixX, matrixY); } diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index df31154..0a2a29b 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -19,6 +19,10 @@ public class MovePlate : MonoBehaviour public bool attack = false; public bool promote = false; + // Escolha da promoção + public string pecaPromo = "Tower"; + + // Chamada quando o moveplate é criado public void Start() { @@ -35,52 +39,28 @@ public void Start() } } - public static PieceType ShowPromotionMenu() + //Funções que mudam o nome da escolha de peça. Atrelados aos Butões do Panel + public void PromoteToQueen() { - PieceType selectedPiece = PieceType.Queen; - bool promote = true; - - if (promote) - { - bool queen = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Rainha", "Torre"); - if (queen) - { - selectedPiece = PieceType.Queen; - } - else - { - bool tower = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Torre", "Bispo"); - if (tower) - { - selectedPiece = PieceType.Tower; - } - else - { - bool bishop = EditorUtility.DisplayDialog("Promoção", "Escolha para qual peça será promovida:", "Bispo", "Cavalo"); - if (bishop) - { - selectedPiece = PieceType.Bishop; - } - else - { - selectedPiece = PieceType.Knight; - } - } - } - } + pecaPromo = "Queen"; + } - return selectedPiece; + public void PromoteToTower() + { + pecaPromo = "Tower"; } + public void PromoteToBishop() + { + pecaPromo = "Bishop"; + } - public enum PieceType + public void PromoteToKnight() { - Queen, - Tower, - Bishop, - Knight + pecaPromo = "Knight"; } + /* Função do Unity que é chamada quando o usuário clica e solta o botão do mouse. Nesse caso, essa OnMouseUp é responsável pela troca de um moveplate com a peça @@ -115,29 +95,30 @@ public void OnMouseUp() reference.GetComponent().SetYBoard(matrixY); reference.GetComponent().SetCoordinates(); controller.GetComponent().SetPosition(reference); - + + //Função de promoção, muda a peça para a escolhida if (promote) { - PieceType promocao = ShowPromotionMenu(); + GameObject cp = controller.GetComponent().GetPosition(matrixX, matrixY); if (matrixY == 7) { - if (promocao == PieceType.Tower) + if (pecaPromo == "Tower") { cp.name = "whiteTower"; cp.GetComponent().sprite = reference.GetComponent().GetWhiteTower(); } - if (promocao == PieceType.Queen) + if (pecaPromo == "Queen") { cp.name = "whiteQueen"; cp.GetComponent().sprite = reference.GetComponent().GetWhiteQueen(); } - if (promocao == PieceType.Bishop) + if (pecaPromo == "Bishop") { cp.name = "whiteBishop"; cp.GetComponent().sprite = reference.GetComponent().GetWhiteBishop(); } - if (promocao == PieceType.Knight) + if (pecaPromo == "Knight") { cp.name = "whiteKnight"; cp.GetComponent().sprite = reference.GetComponent().GetWhiteKnight(); @@ -145,22 +126,22 @@ public void OnMouseUp() } else { - if (promocao == PieceType.Tower) + if (pecaPromo == "Tower") { cp.name = "blackTower"; cp.GetComponent().sprite = reference.GetComponent().GetBlackTower(); } - if (promocao == PieceType.Queen) + if (pecaPromo == "Queen") { cp.name = "blackQueen"; cp.GetComponent().sprite = reference.GetComponent().GetBlackQueen(); } - if (promocao == PieceType.Bishop) + if (pecaPromo == "Bishop") { cp.name = "blackBishop"; cp.GetComponent().sprite = reference.GetComponent().GetBlackBishop(); } - if (promocao == PieceType.Knight) + if (pecaPromo == "Knight") { cp.name = "blackKnight"; cp.GetComponent().sprite = reference.GetComponent().GetBlackKnight(); diff --git a/chess-game-project/ProjectSettings/TagManager.asset b/chess-game-project/ProjectSettings/TagManager.asset index 23b135a..4939145 100644 --- a/chess-game-project/ProjectSettings/TagManager.asset +++ b/chess-game-project/ProjectSettings/TagManager.asset @@ -7,6 +7,7 @@ TagManager: - MovePlate - EndText - WinnerText + - Panel layers: - Default - TransparentFX diff --git a/chess-game-project/UserSettings/EditorUserSettings.asset b/chess-game-project/UserSettings/EditorUserSettings.asset index cf95208..42080f5 100644 --- a/chess-game-project/UserSettings/EditorUserSettings.asset +++ b/chess-game-project/UserSettings/EditorUserSettings.asset @@ -12,10 +12,10 @@ EditorUserSettings: value: 025351575006085e5f5d5e7a16750744104e1e7b2f717360742d4830bab7636b flags: 0 RecentlyUsedSceneGuid-2: - value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 + value: 00550000560d5c5f0e585d7042710a444e4f1b7c2e707365782c4c62e4b2303c flags: 0 RecentlyUsedSceneGuid-3: - value: 00550000560d5c5f0e585d7042710a444e4f1b7c2e707365782c4c62e4b2303c + value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 flags: 0 vcSharedLogLevel: value: 0d5e400f0650 diff --git a/chess-game-project/UserSettings/Layouts/default-2021.dwlt b/chess-game-project/UserSettings/Layouts/default-2021.dwlt index d389f59..948e275 100644 --- a/chess-game-project/UserSettings/Layouts/default-2021.dwlt +++ b/chess-game-project/UserSettings/Layouts/default-2021.dwlt @@ -8,22 +8,22 @@ MonoBehaviour: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 - m_EditorHideFlags: 0 + m_EditorHideFlags: 1 m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} m_Name: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 72 - y: 144 - width: 1368 - height: 811 + x: 0 + y: 43 + width: 1920 + height: 1037 m_ShowMode: 4 - m_Title: Game + m_Title: Scene m_RootView: {fileID: 6} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} - m_Maximized: 0 + m_Maximized: 1 --- !u!114 &2 MonoBehaviour: m_ObjectHideFlags: 52 @@ -43,12 +43,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 30 - width: 1368 - height: 761 + width: 1920 + height: 987 m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 96 + controlID: 15 --- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 @@ -64,10 +64,10 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 1045 + x: 1466 y: 0 - width: 323 - height: 761 + width: 454 + height: 987 m_MinSize: {x: 276, y: 71} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 13} @@ -92,8 +92,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 258 - height: 448 + width: 363 + height: 707 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 14} @@ -111,23 +111,23 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ConsoleWindow + m_Name: ProjectBrowser m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 x: 0 - y: 448 - width: 1045 - height: 313 + y: 707 + width: 1466 + height: 280 m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} - m_ActualView: {fileID: 13} + m_ActualView: {fileID: 12} m_Panes: - {fileID: 12} - {fileID: 17} - m_Selected: 1 - m_LastSelected: 0 + m_Selected: 0 + m_LastSelected: 1 --- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 @@ -148,8 +148,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1368 - height: 811 + width: 1920 + height: 1037 m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 @@ -173,7 +173,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1368 + width: 1920 height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -194,8 +194,8 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 791 - width: 1368 + y: 1017 + width: 1920 height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -218,11 +218,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1045 - height: 761 + width: 1466 + height: 987 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 + controlID: 16 --- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 @@ -242,12 +243,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1045 - height: 448 + width: 1466 + height: 707 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 98 + controlID: 17 --- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 @@ -258,68 +259,24 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: GameView + m_Name: SceneView m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 - x: 258 + x: 363 y: 0 - width: 787 - height: 448 + width: 1103 + height: 707 m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} - m_ActualView: {fileID: 17} + m_ActualView: {fileID: 15} m_Panes: - {fileID: 15} - {fileID: 16} - - {fileID: 17} - - {fileID: 12} - m_Selected: 1 - m_LastSelected: 0 + m_Selected: 0 + m_LastSelected: 1 --- !u!114 &12 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 275, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Inspector - m_Image: {fileID: -2667387946076563598, guid: 0000000000000000d000000000000000, type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 362 - y: 73 - width: 1102 - height: 563 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 - m_ObjectsLockedBeforeSerialization: [] - m_InstanceIDsLockedBeforeSerialization: - m_PreviewResizer: - m_CachedPref: 409 - m_ControlHash: 1412526313 - m_PrefName: Preview_InspectorPreview - m_LastInspectedObjectInstanceID: 24542 - m_LastVerticalScrollValue: 0 - m_GlobalObjectId: - m_InspectorMode: 0 - m_LockTracker: - m_IsLocked: 0 - m_PreviewWindow: {fileID: 0} ---- !u!114 &13 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -339,10 +296,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 72 - y: 647 - width: 1044 - height: 292 + x: 0 + y: 780 + width: 1465 + height: 259 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -361,22 +318,22 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/Assets/Sprites/Tiles + - Assets/Scripts m_Globs: [] m_OriginalText: m_ViewMode: 1 m_StartGridSize: 64 m_LastFolders: - - Assets/Assets/Sprites/Tiles + - Assets/Scripts m_LastFoldersGridSize: -1 - m_LastProjectPath: /home/igor/Documentos/UFF/Graduacao/7_periodo/ES2/chessGame/chess-game-project + m_LastProjectPath: C:\Users\johan\Documents\GitHub\chessGame\chess-game-project m_LockTracker: m_IsLocked: 0 m_FolderTreeState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: de5f0000 - m_LastClickedID: 24542 - m_ExpandedIDs: 00000000b85f0000bc5f0000d05f000000ca9a3b + scrollPos: {x: 0, y: 229} + m_SelectedIDs: fc5f0000 + m_LastClickedID: 24572 + m_ExpandedIDs: 00000000f05f0000f25f0000f45f0000f65f0000f85f0000fa5f0000fc5f0000fe5f0000006000000260000004600000066000000860000000ca9a3b m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -404,7 +361,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000 + m_ExpandedIDs: 00000000f05f0000f25f0000f45f0000f65f0000f85f0000fa5f0000fc5f0000fe5f00000060000002600000046000000660000008600000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -431,8 +388,8 @@ MonoBehaviour: m_ListAreaState: m_SelectedInstanceIDs: m_LastClickedInstanceID: 0 - m_HadKeyboardFocusLastEvent: 0 - m_ExpandedInstanceIDs: c62300005e6c0000f86a0000f4680000e6650000 + m_HadKeyboardFocusLastEvent: 1 + m_ExpandedInstanceIDs: c6230000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -448,7 +405,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 5} + m_ClientGUIView: {fileID: 0} m_CreateAssetUtility: m_EndAction: {fileID: 0} m_InstanceID: 0 @@ -480,10 +437,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1117 - y: 199 - width: 322 - height: 740 + x: 1466 + y: 73 + width: 453 + height: 966 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -522,10 +479,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 72 - y: 199 - width: 257 - height: 427 + x: 0 + y: 73 + width: 362 + height: 686 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -534,9 +491,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: de5f0000 + m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 0cfbffff + m_ExpandedIDs: 18e5ffff60e5ffff84f8ffff1afbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -580,10 +537,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1802 - y: 92 - width: 1103 - height: 550 + x: 363 + y: 73 + width: 1101 + height: 686 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -637,7 +594,7 @@ MonoBehaviour: floating: 0 collapsed: 0 displayed: 1 - snapOffset: {x: 0, y: 25} + snapOffset: {x: 0, y: 0} snapOffsetDelta: {x: 0, y: 0} snapCorner: 0 id: unity-transform-toolbar @@ -841,9 +798,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: 0.8157873, y: -0.016838798, z: -0.085324034} + m_Target: {x: 0.5197881, y: 0.3914951, z: 58.432983} speed: 2 - m_Value: {x: 0.8157873, y: -0.016838798, z: -0.085324034} + m_Value: {x: 0.5197881, y: 0.3914951, z: 58.432983} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -894,9 +851,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 5.977448 + m_Target: 5.869256 speed: 2 - m_Value: 5.977448 + m_Value: 5.869256 m_Ortho: m_Target: 1 speed: 2 @@ -941,10 +898,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 330 - y: 199 - width: 785 - height: 427 + x: 363 + y: 73 + width: 1101 + height: 686 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -983,7 +940,7 @@ MonoBehaviour: m_HSlider: 0 m_VSlider: 0 m_IgnoreScrollWheelUntilClicked: 0 - m_EnableMouseInput: 1 + m_EnableMouseInput: 0 m_EnableSliderZoomHorizontal: 0 m_EnableSliderZoomVertical: 0 m_UniformScale: 1 @@ -992,23 +949,23 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 785 - height: 406 - m_Scale: {x: 0.37592593, y: 0.37592593} - m_Translation: {x: 392.5, y: 203} + width: 1101 + height: 665 + m_Scale: {x: 0.5734375, y: 0.5734375} + m_Translation: {x: 550.5, y: 332.5} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -1044.0886 - y: -540 - width: 2088.1772 - height: 1080 + x: -960 + y: -579.8365 + width: 1920 + height: 1159.673 m_MinimalGUI: 1 - m_defaultScale: 0.37592593 - m_LastWindowPixelSize: {x: 785, y: 427} + m_defaultScale: 0.5734375 + m_LastWindowPixelSize: {x: 1101, y: 686} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 @@ -1035,9 +992,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 629 + y: 780 width: 1465 - height: 362 + height: 259 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default From 5d3dbfd771a0c9386e0279b7b2ca778068637363 Mon Sep 17 00:00:00 2001 From: Johann Daflon Date: Sat, 24 Jun 2023 02:46:08 -0300 Subject: [PATCH 12/13] =?UTF-8?q?Corrigido=20falta=20de=20umafun=C3=A7?= =?UTF-8?q?=C3=A3o=20que=20faltou=20nos=20merges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit testes locais OK --- chess-game-project/Assets/Scripts/Chessman.cs | 5 + chess-game-project/Assets/Scripts/Game.cs | 62 +- .../UserSettings/Layouts/default-2021.dwlt | 1311 +++-------------- 3 files changed, 286 insertions(+), 1092 deletions(-) diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index bcf8dc6..9f39d3c 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -137,6 +137,11 @@ public string GetPlayer() return this.player; } + public string GetName() + { + return this.name; + } + public Sprite GetWhiteQueen() { return whiteQueen[setID]; diff --git a/chess-game-project/Assets/Scripts/Game.cs b/chess-game-project/Assets/Scripts/Game.cs index 017a7c3..64bba19 100644 --- a/chess-game-project/Assets/Scripts/Game.cs +++ b/chess-game-project/Assets/Scripts/Game.cs @@ -1,7 +1,3 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; @@ -10,7 +6,7 @@ public class Game : MonoBehaviour { public GameObject chesspiece; - private GameObject[,] positions = new GameObject[8,8]; + private GameObject[,] positions = new GameObject[8, 8]; private GameObject[] whitePlayer = new GameObject[16]; private GameObject[] blackPlayer = new GameObject[16]; private GameObject[,] destroyedPieces; @@ -18,22 +14,24 @@ public class Game : MonoBehaviour private string currentPlayer = "white"; private bool gameOver = false; + private bool blackIa = true; + private bool whiteIa = false; // Start is called before the first frame update public void Start() { - whitePlayer = new GameObject[] + whitePlayer = new GameObject[] { - Create("whitePawn", 0, 1), Create("whitePawn", 1, 1), Create("whitePawn", 2, 1), - Create("whitePawn", 3, 1), Create("whitePawn", 4, 1), Create("whitePawn", 5, 1), + Create("whitePawn", 0, 1), Create("whitePawn", 1, 1), Create("whitePawn", 2, 1), + Create("whitePawn", 3, 1), Create("whitePawn", 4, 1), Create("whitePawn", 5, 1), Create("whitePawn", 6, 1), Create("whitePawn", 7, 1), - Create("whiteTower", 0, 0), Create("whiteKnight", 1, 0), Create("whiteBishop", 2, 0), - Create("whiteQueen", 3, 0), Create("whiteKing", 4, 0), + Create("whiteTower", 0, 0), Create("whiteKnight", 1, 0), Create("whiteBishop", 2, 0), + Create("whiteQueen", 3, 0), Create("whiteKing", 4, 0), Create("whiteBishop", 5, 0), Create("whiteKnight", 6, 0), Create("whiteTower", 7, 0), }; blackPlayer = new GameObject[] { - + Create("blackPawn", 0, 6), Create("blackPawn", 1, 6), Create("blackPawn", 2, 6), Create("blackPawn", 3, 6), Create("blackPawn", 4, 6), Create("blackPawn", 5, 6), Create("blackPawn", 6, 6), Create("blackPawn", 7, 6), @@ -42,22 +40,22 @@ public void Start() Create("blackBishop", 5, 7), Create("blackKnight", 6, 7), Create("blackTower", 7, 7) }; - this.destroyedPieces = new GameObject[4,8]; + this.destroyedPieces = new GameObject[4, 8]; // Coloca as peças no tabuleiro - for (int i = 0; i < whitePlayer.Length; i++) + for (int i = 0; i < whitePlayer.Length; i++) { SetPosition(whitePlayer[i]); } - for (int i = 0; i < blackPlayer.Length; i++) + for (int i = 0; i < blackPlayer.Length; i++) { SetPosition(blackPlayer[i]); } } // Função responsável por criar as peças no tabuleiro. - public GameObject Create(string name, int x, int y) + public GameObject Create(string name, int x, int y) { GameObject obj = Instantiate(chesspiece, new Vector3(0, 0, -1), Quaternion.identity); Chessman chessman = obj.GetComponent(); @@ -70,7 +68,7 @@ public GameObject Create(string name, int x, int y) } // Funções de Set e Get da posição de um GameObject. - public void SetPosition(GameObject obj) + public void SetPosition(GameObject obj) { Chessman chessman = obj.GetComponent(); @@ -112,7 +110,7 @@ public GameObject[] GetWhitePlayer() { return whitePlayer; } - + public GameObject[] GetBlackPlayer() { return blackPlayer; @@ -131,22 +129,32 @@ public void SetPositionEmpty(int x, int y) public void SerPositionSpriteEmpty(int x, int y) { - positions[x, y].GetComponent().sprite = null; + positions[x, y].GetComponent().sprite = null; } // Função verifica se dado um valor (x, y), esse par está dentro do tabuleiro 8x8. - public bool PositionOnBoard(int x, int y) + public bool PositionOnBoard(int x, int y) { if (x < 0 || y < 0 || x >= positions.GetLength(0) || y >= positions.GetLength(1)) return false; return true; } - public string GetCurrentPlayer() + public string GetCurrentPlayer() { return currentPlayer; } + public bool IsBlackIa() + { + return blackIa; + } + + public bool IsWhiteIa() + { + return whiteIa; + } + public bool IsGameOver() { return gameOver; @@ -179,7 +187,7 @@ public void AppendDestroyedPieces(GameObject cp) { if (cp.GetComponent().GetPlayer() == "white") { - for (int i = 1; i >= 0 ; i--) + for (int i = 1; i >= 0; i--) { for (int j = 0; j < 8; j++) { @@ -203,7 +211,7 @@ public void AppendDestroyedPieces(GameObject cp) return; } } - } + } } } @@ -224,8 +232,14 @@ public void AppendDestroyedPieces(GameObject cp) public void Winner(string playerWinner) { gameOver = true; - + + var isTest = GameObject.FindGameObjectWithTag("EndText"); + if (isTest == null) + { + return; + } + GameObject.FindGameObjectWithTag("EndText").GetComponent().enabled = true; GameObject.FindGameObjectWithTag("EndText").GetComponent().text = "O " + playerWinner + " venceu! Pressione o mouse para reiniciar"; } -} +} \ No newline at end of file diff --git a/chess-game-project/UserSettings/Layouts/default-2021.dwlt b/chess-game-project/UserSettings/Layouts/default-2021.dwlt index abe66c1..96e9617 100644 --- a/chess-game-project/UserSettings/Layouts/default-2021.dwlt +++ b/chess-game-project/UserSettings/Layouts/default-2021.dwlt @@ -14,91 +14,17 @@ MonoBehaviour: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 1920 - y: 8 + x: 0 + y: 43 width: 1920 - height: 1032 - m_ShowMode: 0 - m_Title: Profiler - m_RootView: {fileID: 4} - m_MinSize: {x: 880, y: 237} - m_MaxSize: {x: 4000, y: 4021} - m_Maximized: 0 ---- !u!114 &2 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_PixelRect: - serializedVersion: 2 - x: 8 - y: 53 - width: 1902 - height: 971 + height: 1037 m_ShowMode: 4 m_Title: Game - m_RootView: {fileID: 11} + m_RootView: {fileID: 8} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} - m_Maximized: 0 ---- !u!114 &3 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ProfilerWindow - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 1920 - height: 1032 - m_MinSize: {x: 880, y: 216} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 17} - m_Panes: - - {fileID: 17} - m_Selected: 0 - m_LastSelected: 0 ---- !u!114 &4 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 3} - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 1920 - height: 1032 - m_MinSize: {x: 880, y: 237} - m_MaxSize: {x: 4000, y: 4021} - vertical: 0 - controlID: 7081 ---- !u!114 &5 + m_Maximized: 1 +--- !u!114 &2 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -115,16 +41,16 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 450 - height: 736 + width: 238 + height: 789 m_MinSize: {x: 101, y: 121} m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 18} + m_ActualView: {fileID: 14} m_Panes: - - {fileID: 18} + - {fileID: 14} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &6 +--- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -137,19 +63,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: + - {fileID: 2} - {fileID: 5} - - {fileID: 8} m_Position: serializedVersion: 2 - x: 1452 + x: 1682 y: 0 - width: 450 - height: 921 + width: 238 + height: 987 m_MinSize: {x: 100, y: 200} m_MaxSize: {x: 8096, y: 16192} vertical: 1 - controlID: 52 ---- !u!114 &7 + controlID: 57 +--- !u!114 &4 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -162,19 +88,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 14} - - {fileID: 6} + - {fileID: 11} + - {fileID: 3} m_Position: serializedVersion: 2 x: 0 y: 30 - width: 1902 - height: 921 + width: 1920 + height: 987 m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 90 ---- !u!114 &8 + controlID: 56 +--- !u!114 &5 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -190,17 +116,17 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 736 - width: 450 - height: 185 + y: 789 + width: 238 + height: 198 m_MinSize: {x: 276, y: 71} m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 20} + m_ActualView: {fileID: 16} m_Panes: - - {fileID: 20} + - {fileID: 16} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &9 +--- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -217,16 +143,16 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 359 - height: 545 + width: 412 + height: 447 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 21} + m_ActualView: {fileID: 17} m_Panes: - - {fileID: 21} + - {fileID: 17} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &10 +--- !u!114 &7 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -242,18 +168,18 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 545 - width: 1452 - height: 376 - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 24} + y: 447 + width: 1682 + height: 540 + m_MinSize: {x: 101, y: 121} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 20} m_Panes: - - {fileID: 19} - - {fileID: 24} + - {fileID: 15} + - {fileID: 20} m_Selected: 1 m_LastSelected: 0 ---- !u!114 &11 +--- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -266,22 +192,22 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 12} - - {fileID: 7} - - {fileID: 13} + - {fileID: 9} + - {fileID: 4} + - {fileID: 10} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 1902 - height: 971 + width: 1920 + height: 1037 m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 m_TopViewHeight: 30 m_UseBottomView: 1 m_BottomViewHeight: 20 ---- !u!114 &12 +--- !u!114 &9 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -298,12 +224,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1902 + width: 1920 height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} m_LastLoadedLayoutName: ---- !u!114 &13 +--- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -319,12 +245,12 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 951 - width: 1902 + y: 1017 + width: 1920 height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} ---- !u!114 &14 +--- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -337,19 +263,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 15} - - {fileID: 10} + - {fileID: 12} + - {fileID: 7} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 1452 - height: 921 + width: 1682 + height: 987 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 91 ---- !u!114 &15 + controlID: 159 +--- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -362,19 +288,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 9} - - {fileID: 16} + - {fileID: 6} + - {fileID: 13} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 1452 - height: 545 + width: 1682 + height: 447 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 92 ---- !u!114 &16 + controlID: 160 +--- !u!114 &13 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -389,715 +315,19 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 359 + x: 412 y: 0 - width: 1093 - height: 545 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 23} + width: 1270 + height: 447 + m_MinSize: {x: 202, y: 221} + m_MaxSize: {x: 4002, y: 4021} + m_ActualView: {fileID: 19} m_Panes: - - {fileID: 22} - - {fileID: 23} + - {fileID: 18} + - {fileID: 19} m_Selected: 1 m_LastSelected: 0 ---- !u!114 &17 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12070, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 880, y: 216} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Profiler - m_Image: {fileID: -1089619856830078684, guid: 0000000000000000d000000000000000, type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 1920 - y: 8 - width: 1920 - height: 1011 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 - m_Recording: 0 - m_ActiveNativePlatformSupportModuleName: - m_AllModules: - - rid: 6309017941590409233 - - rid: 6309017941590409234 - - rid: 6309017941590409235 - - rid: 6309017941590409236 - - rid: 6309017941590409237 - - rid: 6309017941590409238 - - rid: 6309017941590409239 - - rid: 6309017941590409240 - - rid: 6309017941590409241 - - rid: 6309017941590409242 - - rid: 6309017941590409243 - - rid: 6309017941590409244 - - rid: 6309017941590409245 - - rid: 6309017941590409246 - - rid: 6309017941590409247 - - rid: 6309017941590409248 - m_CallstackRecordMode: 1 - m_ClearOnPlay: 0 - references: - version: 2 - RefIds: - - rid: 6309017941590409233 - type: {class: CPUProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.CPUProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_ViewType: 0 - updateViewLive: 0 - m_CurrentFrameIndex: 299 - m_HierarchyOverruledThreadFromSelection: 0 - m_ProfilerViewFilteringOptions: 1 - m_FrameDataHierarchyView: - m_Serialized: 1 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: - - width: 1402 - sortedAscending: 1 - headerContent: - m_Text: Overview - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 200 - maxWidth: 1000000 - autoResize: 1 - allowToggleVisibility: 0 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: Total - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: Self - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: Calls - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: GC Alloc - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: Time ms - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 80 - sortedAscending: 0 - headerContent: - m_Text: Self ms - m_Image: {fileID: 0} - m_Tooltip: - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 50 - maxWidth: 1000000 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - - width: 25 - sortedAscending: 0 - headerContent: - m_Text: - m_Image: {fileID: -5161429177145976760, guid: 0000000000000000d000000000000000, type: 0} - m_Tooltip: Warnings - contextMenuText: - headerTextAlignment: 0 - sortingArrowAlignment: 2 - minWidth: 25 - maxWidth: 25 - autoResize: 0 - allowToggleVisibility: 1 - canSort: 1 - userData: 0 - m_VisibleColumns: 0000000001000000020000000300000004000000050000000600000007000000 - m_SortedColumns: 05000000 - m_ThreadIndexInThreadNames: 0 - m_DetailedViewType: 0 - m_DetailedViewSpliterState: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: -1 - realSizes: - - 0 - - 0 - relativeSizes: - - 0.7 - - 0.3 - minSizes: - - 450 - - 50 - maxSizes: - - 0 - - 0 - lastTotalSize: 0 - splitSize: 6 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_DetailedObjectsView: - m_SelectedID: -1 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: [] - relativeSizes: [] - minSizes: [] - maxSizes: [] - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_DetailedCallsView: - m_SelectedID: -1 - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: [] - relativeSizes: [] - minSizes: [] - maxSizes: [] - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_CalleesTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_CallersTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_FullThreadName: Main Thread - m_ThreadName: Main Thread - k__BackingField: 20832 - k__BackingField: 0 - m_GroupName: - - rid: 6309017941590409234 - type: {class: GPUProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.GPUProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_ViewType: 0 - updateViewLive: 0 - m_CurrentFrameIndex: -1 - m_HierarchyOverruledThreadFromSelection: 0 - m_ProfilerViewFilteringOptions: 1 - m_FrameDataHierarchyView: - m_Serialized: 0 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_ThreadIndexInThreadNames: 0 - m_DetailedViewType: 0 - m_DetailedViewSpliterState: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: [] - relativeSizes: [] - minSizes: [] - maxSizes: [] - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_DetailedObjectsView: - m_SelectedID: 0 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: [] - relativeSizes: [] - minSizes: [] - maxSizes: [] - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_DetailedCallsView: - m_SelectedID: 0 - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: [] - relativeSizes: [] - minSizes: [] - maxSizes: [] - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - m_CalleesTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_CallersTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_FullThreadName: Main Thread - m_ThreadName: Main Thread - k__BackingField: 0 - k__BackingField: -1 - m_GroupName: - - rid: 6309017941590409235 - type: {class: RenderingProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.RenderingProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409236 - type: {class: MemoryProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.MemoryProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_ViewSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: -1 - realSizes: - - 0 - - 0 - relativeSizes: - - 0.7 - - 0.3 - minSizes: - - 450 - - 50 - maxSizes: - - 0 - - 0 - lastTotalSize: 0 - splitSize: 6 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - - rid: 6309017941590409237 - type: {class: AudioProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.AudioProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_ShowInactiveDSPChains: 0 - m_HighlightAudibleDSPChains: 1 - m_DSPGraphZoomFactor: 1 - - rid: 6309017941590409238 - type: {class: VideoProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.VideoProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409239 - type: {class: PhysicsProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.PhysicsProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409240 - type: {class: Physics2DProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.Physics2DProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409241 - type: {class: NetworkingMessagesProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.NetworkingMessagesProfilerModule, - UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409242 - type: {class: NetworkingOperationsProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.NetworkingOperationsProfilerModule, - UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_NetworkSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: -1 - realSizes: - - 0 - - 0 - relativeSizes: - - 0.2 - - 0.8 - minSizes: - - 100 - - 100 - maxSizes: - - 0 - - 0 - lastTotalSize: 0 - splitSize: 6 - xOffset: 0 - m_Version: 1 - oldRealSizes: - oldMinSizes: - oldMaxSizes: - oldSplitSize: 0 - msgNames: - - UserMessage - - ObjectDestroy - - ClientRpc - - ObjectSpawn - - Owner - - Command - - LocalPlayerTransform - - SyncEvent - - SyncVars - - SyncList - - ObjectSpawnScene - - NetworkInfo - - SpawnFinished - - ObjectHide - - CRC - - ClientAuthority - - rid: 6309017941590409243 - type: {class: UIProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.UIProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409244 - type: {class: UIDetailsProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.UIDetailsProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409245 - type: {class: GlobalIlluminationProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.GlobalIlluminationProfilerModule, - UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409246 - type: {class: VirtualTexturingProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.VirtualTexturingProfilerModule, - UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - m_VTProfilerView: - rid: 6309017941590409249 - - rid: 6309017941590409247 - type: {class: FileIOProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.FileIOProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409248 - type: {class: AssetLoadingProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor.CoreModule} - data: - m_Identifier: UnityEditorInternal.Profiling.AssetLoadingProfilerModule, UnityEditor.CoreModule, - Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_PaneScroll: {x: 0, y: 0} - - rid: 6309017941590409249 - type: {class: VirtualTexturingProfilerView, ns: UnityEditor, asm: UnityEditor.CoreModule} - data: - m_SortAscending: 0 - m_SortedColumn: -1 ---- !u!114 &18 +--- !u!114 &14 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -1117,22 +347,22 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1460 - y: 83 - width: 449 - height: 715 + x: 1682 + y: 73 + width: 237 + height: 768 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default m_SaveData: [] m_OverlaysVisible: 1 m_Spl: - ID: 141 + ID: 182 splitterInitialOffset: 0 currentActiveSplitter: -1 realSizes: - - 484 - - 161 + - 523 + - 175 relativeSizes: - 0.75 - 0.25 @@ -1142,7 +372,7 @@ MonoBehaviour: maxSizes: - 0 - 0 - lastTotalSize: 645 + lastTotalSize: 698 splitSize: 6 xOffset: 0 m_Version: 1 @@ -1152,14 +382,14 @@ MonoBehaviour: oldSplitSize: 0 m_TestTypeToolbarIndex: 0 m_PlayModeTestListGUI: - m_Window: {fileID: 18} + m_Window: {fileID: 14} m_NewResultList: - id: 1005 uniqueId: '[chess-game-project][suite]' name: chess-game-project fullName: chess-game-project resultStatus: 1 - duration: 1.398021 + duration: 2.6993935 messages: output: stacktrace: @@ -1170,12 +400,12 @@ MonoBehaviour: categories: [] parentId: parentUniqueId: - - id: 1026 - uniqueId: '[Tests][D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' + - id: 1039 + uniqueId: '[Tests][C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' name: Tests.dll - fullName: D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll + fullName: C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll resultStatus: 1 - duration: 1.222874 + duration: 2.361438 messages: output: stacktrace: @@ -1184,14 +414,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1005 + parentId: 1000 parentUniqueId: '[chess-game-project][suite]' - id: 1001 uniqueId: Tests.dll/[Tests][ChessmanTests][suite] name: ChessmanTests fullName: ChessmanTests resultStatus: 1 - duration: 0.0491955 + duration: 0.073714 messages: output: stacktrace: @@ -1200,14 +430,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1037 - parentUniqueId: '[Tests][D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' + parentId: 1039 + parentUniqueId: '[Tests][C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' - id: 1016 uniqueId: Tests.dll/ChessmanTests/[Tests][ChessmanTests.ShouldCallOnMouseUp] name: ShouldCallOnMouseUp fullName: ChessmanTests.ShouldCallOnMouseUp resultStatus: 1 - duration: 0.0010314 + duration: 0.0016468 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1229,7 +459,7 @@ MonoBehaviour: name: ShouldInitializeAttackMovePlate_King_Side fullName: ChessmanTests.ShouldInitializeAttackMovePlate_King_Side resultStatus: 1 - duration: 0.001036 + duration: 0.0017218 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1251,7 +481,7 @@ MonoBehaviour: name: ShouldInitializeAttackMovePlate_Left_Pawn fullName: ChessmanTests.ShouldInitializeAttackMovePlate_Left_Pawn resultStatus: 1 - duration: 0.0010109 + duration: 0.0015282 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1273,7 +503,7 @@ MonoBehaviour: name: ShouldInitializeAttackMovePlate_Queen_Up fullName: ChessmanTests.ShouldInitializeAttackMovePlate_Queen_Up resultStatus: 1 - duration: 0.0012158 + duration: 0.0018365 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1295,7 +525,7 @@ MonoBehaviour: name: ShouldInitializeAttackMovePlate_Right_Pawn fullName: ChessmanTests.ShouldInitializeAttackMovePlate_Right_Pawn resultStatus: 1 - duration: 0.0011962 + duration: 0.0014851 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1317,7 +547,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackBishop fullName: ChessmanTests.ShouldInitializeMovePlate_BlackBishop resultStatus: 1 - duration: 0.0008644 + duration: 0.0012823 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1339,7 +569,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackKing fullName: ChessmanTests.ShouldInitializeMovePlate_BlackKing resultStatus: 1 - duration: 0.0009618 + duration: 0.0015256 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1361,7 +591,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackKnight fullName: ChessmanTests.ShouldInitializeMovePlate_BlackKnight resultStatus: 1 - duration: 0.0007937 + duration: 0.0011503 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1383,7 +613,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackPawn fullName: ChessmanTests.ShouldInitializeMovePlate_BlackPawn resultStatus: 1 - duration: 0.0013425 + duration: 0.0018015 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1405,7 +635,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackQueen fullName: ChessmanTests.ShouldInitializeMovePlate_BlackQueen resultStatus: 1 - duration: 0.0010634 + duration: 0.0016495 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1427,7 +657,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_BlackTower fullName: ChessmanTests.ShouldInitializeMovePlate_BlackTower resultStatus: 1 - duration: 0.0009784 + duration: 0.0015281 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1449,7 +679,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhiteBishop fullName: ChessmanTests.ShouldInitializeMovePlate_WhiteBishop resultStatus: 1 - duration: 0.001056 + duration: 0.0016566 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1471,7 +701,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhiteKing fullName: ChessmanTests.ShouldInitializeMovePlate_WhiteKing resultStatus: 1 - duration: 0.0009404 + duration: 0.0018033 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1493,7 +723,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhiteKnight fullName: ChessmanTests.ShouldInitializeMovePlate_WhiteKnight resultStatus: 1 - duration: 0.0010126 + duration: 0.0016259 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1515,7 +745,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhitePawn fullName: ChessmanTests.ShouldInitializeMovePlate_WhitePawn resultStatus: 1 - duration: 0.0155234 + duration: 0.0204167 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1537,7 +767,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhiteQueen fullName: ChessmanTests.ShouldInitializeMovePlate_WhiteQueen resultStatus: 1 - duration: 0.0011271 + duration: 0.0017163 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1559,7 +789,7 @@ MonoBehaviour: name: ShouldInitializeMovePlate_WhiteTower fullName: ChessmanTests.ShouldInitializeMovePlate_WhiteTower resultStatus: 1 - duration: 0.0010361 + duration: 0.0016945 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1581,7 +811,7 @@ MonoBehaviour: name: ShouldInitializeOneMovePlate_Pawn fullName: ChessmanTests.ShouldInitializeOneMovePlate_Pawn resultStatus: 1 - duration: 0.0007871 + duration: 0.0012042 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1598,80 +828,59 @@ MonoBehaviour: - Uncategorized parentId: 1001 parentUniqueId: Tests.dll/[Tests][ChessmanTests][suite] - - id: 1009 + - id: 1020 uniqueId: Tests.dll/[Tests][GameTests][suite] name: GameTests fullName: GameTests resultStatus: 1 - duration: 0.0351051 + duration: 0.9649318 messages: - output: 'ArgumentException: The Object you want to instantiate is null. - - ArgumentException: - The Object you want to instantiate is null. - - ArgumentException: The - Object you want to instantiate is null. - - ArgumentException: The Object - you want to instantiate is null. - - ArgumentException: The Object you - want to instantiate is null. - - ArgumentException: The Object you want - to instantiate is null. - - ArgumentException: The Object you want to - instantiate is null. - - ArgumentException: The Object you want to instantiate - is null. - - ArgumentException: The Object you want to instantiate is - null. - - ArgumentException: The Object you want to instantiate is null. - - ArgumentException: - The Object you want to instantiate is null. - - ArgumentException: The - Object you want to instantiate is null. - - ArgumentException: The Object - you want to instantiate is null. - - ArgumentException: The Object you - want to instantiate is null. - - ArgumentException: The Object you want - to instantiate is null. - - ArgumentException: The Object you want to - instantiate is null. - - ArgumentException: The Object you want to instantiate - is null. - - ArgumentException: The Object you want to instantiate is - null. - -' + output: "ArgumentException: The Object you want to instantiate is null.\r\nSentry: + (Warning) Failed to end session because there is none active. \r\nArgumentException: + The Object you want to instantiate is null.\r\nSentry: (Warning) Failed to + end session because there is none active. \r\nArgumentException: The Object + you want to instantiate is null.\r\nSentry: (Warning) Failed to end session + because there is none active. \r\nArgumentException: The Object you want + to instantiate is null.\r\nSentry: (Warning) Failed to end session because + there is none active. \r\nArgumentException: The Object you want to instantiate + is null.\r\nSentry: (Warning) Failed to end session because there is none + active. \r\nArgumentException: The Object you want to instantiate is null.\r\nSentry: + (Warning) Failed to end session because there is none active. \r\nArgumentException: + The Object you want to instantiate is null.\r\nSentry: (Warning) Failed to + end session because there is none active. \r\nArgumentException: The Object + you want to instantiate is null.\r\nSentry: (Warning) Failed to end session + because there is none active. \r\nArgumentException: The Object you want + to instantiate is null.\r\nSentry: (Warning) Failed to end session because + there is none active. \r\nArgumentException: The Object you want to instantiate + is null.\r\nSentry: (Warning) Failed to end session because there is none + active. \r\nArgumentException: The Object you want to instantiate is null.\r\nSentry: + (Warning) Failed to end session because there is none active. \r\nArgumentException: + The Object you want to instantiate is null.\r\nSentry: (Warning) Failed to + end session because there is none active. \r\nArgumentException: The Object + you want to instantiate is null.\r\nSentry: (Warning) Failed to end session + because there is none active. \r\nArgumentException: The Object you want + to instantiate is null.\r\nSentry: (Warning) Failed to end session because + there is none active. \r\nArgumentException: The Object you want to instantiate + is null.\r\nSentry: (Warning) Failed to end session because there is none + active. \r\nArgumentException: The Object you want to instantiate is null.\r\nSentry: + (Warning) Failed to end session because there is none active. \r\nArgumentException: + The Object you want to instantiate is null.\r\nSentry: (Warning) Failed to + end session because there is none active. \r\nArgumentException: The Object + you want to instantiate is null.\r\n" stacktrace: notRunnable: 0 ignoredOrSkipped: 0 description: isSuite: 1 categories: [] - parentId: 1026 - parentUniqueId: '[Tests][D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' - - id: 1012 + parentId: 1039 + parentUniqueId: '[Tests][C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' + - id: 1023 uniqueId: Tests.dll/GameTests/[Tests][GameTests.Create_PieceInstantiatedWithCorrectProperties] name: Create_PieceInstantiatedWithCorrectProperties fullName: GameTests.Create_PieceInstantiatedWithCorrectProperties resultStatus: 1 - duration: 0.002801 + duration: 0.0019761 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1686,14 +895,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - - id: 1013 + - id: 1024 uniqueId: Tests.dll/GameTests/[Tests][GameTests.PlayerTurns_Tests] name: PlayerTurns_Tests fullName: GameTests.PlayerTurns_Tests resultStatus: 1 - duration: 0.0004935 + duration: 0.0008719 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1708,14 +917,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - - id: 1011 + - id: 1022 uniqueId: Tests.dll/GameTests/[Tests][GameTests.PositionOnBoard_PositionOutOfBounds_ReturnsFalse] name: PositionOnBoard_PositionOutOfBounds_ReturnsFalse fullName: GameTests.PositionOnBoard_PositionOutOfBounds_ReturnsFalse resultStatus: 1 - duration: 0.0006925 + duration: 0.0010934 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1730,14 +939,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - - id: 1010 + - id: 1021 uniqueId: Tests.dll/GameTests/[Tests][GameTests.PositionOnBoard_PositionWithinBounds_ReturnsTrue] name: PositionOnBoard_PositionWithinBounds_ReturnsTrue fullName: GameTests.PositionOnBoard_PositionWithinBounds_ReturnsTrue resultStatus: 1 - duration: 0.0005556 + duration: 0.0009609 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1752,14 +961,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - - id: 1015 + - id: 1026 uniqueId: Tests.dll/GameTests/[Tests][GameTests.ShoudStartGame_Test] name: ShoudStartGame_Test fullName: GameTests.ShoudStartGame_Test resultStatus: 1 - duration: 0.0015418 + duration: 0.0022495 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1774,14 +983,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - - id: 1014 + - id: 1025 uniqueId: "Tests.dll/GameTests/[Tests][GameTests.ShouldInitializeAllP\xECeces_Test]" name: "ShouldInitializeAllP\xECeces_Test" fullName: "GameTests.ShouldInitializeAllP\xECeces_Test" resultStatus: 1 - duration: 0.0106354 + duration: 0.0151626 messages: output: 'You are trying to create a MonoBehaviour using the ''new'' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). @@ -1796,14 +1005,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1009 + parentId: 1020 parentUniqueId: Tests.dll/[Tests][GameTests][suite] - id: 1027 uniqueId: Tests.dll/[Tests][MenuControllerTests][suite] name: MenuControllerTests fullName: MenuControllerTests - resultStatus: 0 - duration: 0 + resultStatus: 1 + duration: 1.265045 messages: output: stacktrace: @@ -1812,14 +1021,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1041 - parentUniqueId: '[Tests][D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' + parentId: 1039 + parentUniqueId: '[Tests][C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' - id: 1028 uniqueId: Tests.dll/MenuControllerTests/[Tests][MenuControllerTests.StartGame_LoadsMainScene] name: StartGame_LoadsMainScene fullName: MenuControllerTests.StartGame_LoadsMainScene - resultStatus: 0 - duration: 0 + resultStatus: 1 + duration: 1.2354583 messages: output: stacktrace: @@ -1831,12 +1040,12 @@ MonoBehaviour: - Uncategorized parentId: 1027 parentUniqueId: Tests.dll/[Tests][MenuControllerTests][suite] - - id: 1016 + - id: 1029 uniqueId: Tests.dll/[Tests][MovementTest][suite] name: MovementTest fullName: MovementTest resultStatus: 1 - duration: 0.0246257 + duration: 0.0325978 messages: output: stacktrace: @@ -1845,31 +1054,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1026 - parentUniqueId: '[Tests][D:/Unity/Projects/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' - - id: 1039 - uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Checkmate_Test] - name: Checkmate_Test - fullName: MovementTest.Checkmate_Test - resultStatus: 0 - duration: 0 - messages: - output: - stacktrace: - notRunnable: 0 - ignoredOrSkipped: 0 - description: - isSuite: 0 - categories: - - Uncategorized - parentId: 1029 - parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1020 + parentId: 1039 + parentUniqueId: '[Tests][C:/Users/johan/Documents/GitHub/chessGame/chess-game-project/Library/ScriptAssemblies/Tests.dll][suite]' + - id: 1033 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_BishopToSelectedPosition] name: Move_BishopToSelectedPosition fullName: MovementTest.Move_BishopToSelectedPosition resultStatus: 1 - duration: 0.0024881 + duration: 0.0049693 messages: output: stacktrace: @@ -1879,14 +1071,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1017 + - id: 1030 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_KnightToSelectedPosition] name: Move_KnightToSelectedPosition fullName: MovementTest.Move_KnightToSelectedPosition resultStatus: 1 - duration: 0.0005617 + duration: 0.0014105 messages: output: stacktrace: @@ -1896,14 +1088,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1018 + - id: 1031 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_PawnToSelectedPosition] name: Move_PawnToSelectedPosition fullName: MovementTest.Move_PawnToSelectedPosition resultStatus: 1 - duration: 0.0005528 + duration: 0.0018439 messages: output: stacktrace: @@ -1913,14 +1105,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1025 + - id: 1038 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_QueenKingToSelectedPositionAxis] name: Move_QueenKingToSelectedPositionAxis fullName: MovementTest.Move_QueenKingToSelectedPositionAxis resultStatus: 1 - duration: 0.0005245 + duration: 0.001304 messages: output: stacktrace: @@ -1930,14 +1122,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1022 + - id: 1035 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_QueenKingToSelectedPositionDown] name: Move_QueenKingToSelectedPositionDown fullName: MovementTest.Move_QueenKingToSelectedPositionDown resultStatus: 1 - duration: 0.0005237 + duration: 0.0011139 messages: output: stacktrace: @@ -1947,14 +1139,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1024 + - id: 1037 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_QueenKingToSelectedPositionLeft] name: Move_QueenKingToSelectedPositionLeft fullName: MovementTest.Move_QueenKingToSelectedPositionLeft resultStatus: 1 - duration: 0.000527 + duration: 0.0009016 messages: output: stacktrace: @@ -1964,14 +1156,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1023 + - id: 1036 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_QueenKingToSelectedPositionRight] name: Move_QueenKingToSelectedPositionRight fullName: MovementTest.Move_QueenKingToSelectedPositionRight resultStatus: 1 - duration: 0.0005203 + duration: 0.0008748 messages: output: stacktrace: @@ -1981,14 +1173,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1021 + - id: 1034 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_QueenKingToSelectedPositionUP] name: Move_QueenKingToSelectedPositionUP fullName: MovementTest.Move_QueenKingToSelectedPositionUP resultStatus: 1 - duration: 0.0005232 + duration: 0.0011086 messages: output: stacktrace: @@ -1998,31 +1190,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 + parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1019 + - id: 1032 uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.Move_TowerToSelectedPosition] name: Move_TowerToSelectedPosition fullName: MovementTest.Move_TowerToSelectedPosition resultStatus: 1 - duration: 0.0005214 - messages: - output: - stacktrace: - notRunnable: 0 - ignoredOrSkipped: 0 - description: - isSuite: 0 - categories: - - Uncategorized - parentId: 1016 - parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - - id: 1040 - uniqueId: Tests.dll/MovementTest/[Tests][MovementTest.RedMoveplate_Test] - name: RedMoveplate_Test - fullName: MovementTest.RedMoveplate_Test - resultStatus: 0 - duration: 0 + duration: 0.000919 messages: output: stacktrace: @@ -2034,13 +1209,13 @@ MonoBehaviour: - Uncategorized parentId: 1029 parentUniqueId: Tests.dll/[Tests][MovementTest][suite] - m_ResultText: chess-game-project (1.398s) + m_ResultText: chess-game-project (2,699s) m_ResultStacktrace: m_TestListState: scrollPos: {x: 0, y: 0} m_SelectedIDs: cb26407e m_LastClickedID: 2118133451 - m_ExpandedIDs: 03149dec5c42d5edfa2eb317bb864b249a6f8268dce72a71cb26407effffff7f + m_ExpandedIDs: 03149dec5c42d5edfa2eb317bb864b24681c89409a6f8268dce72a71cb26407effffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -2068,7 +1243,7 @@ MonoBehaviour: - Uncategorized m_SelectedOption: 0 m_EditModeTestListGUI: - m_Window: {fileID: 18} + m_Window: {fileID: 14} m_NewResultList: - id: 1000 uniqueId: '[chess-game-project][suite]' @@ -2118,7 +1293,7 @@ MonoBehaviour: selectedCategoryMask: 0 availableCategories: - Uncategorized ---- !u!114 &19 +--- !u!114 &15 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2175,7 +1350,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 60.600006} m_SelectedIDs: 926e0000 m_LastClickedID: 28306 - m_ExpandedIDs: 00000000426100004461000046610000486100004a6100004c610000 + m_ExpandedIDs: 000000000460000006600000086000000a6000000c6000000e60000010600000126000001460000016600000186000001a6000001c600000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -2203,7 +1378,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000426100004461000046610000486100004a6100004c610000 + m_ExpandedIDs: 000000000460000006600000086000000a6000000c6000000e60000010600000126000001460000016600000186000001a6000001c600000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -2247,7 +1422,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 10} + m_ClientGUIView: {fileID: 7} m_CreateAssetUtility: m_EndAction: {fileID: 0} m_InstanceID: 0 @@ -2259,7 +1434,7 @@ MonoBehaviour: m_GridSize: 64 m_SkipHiddenPackages: 0 m_DirectoriesAreaWidth: 207 ---- !u!114 &20 +--- !u!114 &16 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2279,10 +1454,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1460 - y: 819 - width: 449 - height: 164 + x: 1682 + y: 862 + width: 237 + height: 177 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -2301,7 +1476,7 @@ MonoBehaviour: m_LockTracker: m_IsLocked: 0 m_PreviewWindow: {fileID: 0} ---- !u!114 &21 +--- !u!114 &17 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2321,10 +1496,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 8 - y: 83 - width: 358 - height: 524 + x: 0 + y: 73 + width: 411 + height: 426 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -2335,7 +1510,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 1afbffff + m_ExpandedIDs: 14e4ffff4ce4ffffbef8ffff9efaffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -2351,7 +1526,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 9} + m_ClientGUIView: {fileID: 6} m_SearchString: m_ExpandedScenes: [] m_CurrenRootInstanceID: 0 @@ -2359,7 +1534,7 @@ MonoBehaviour: m_IsLocked: 0 m_CurrentSortingName: TransformSorting m_WindowGUID: 4c969a2b90040154d917609493e03593 ---- !u!114 &22 +--- !u!114 &18 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2640,9 +1815,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: -0.6088897, y: 0.15133493, z: 640.96497} + m_Target: {x: 0.5197881, y: 0.3914951, z: 58.432983} speed: 2 - m_Value: {x: -0.6088897, y: 0.15133493, z: 640.96497} + m_Value: {x: 0.5197881, y: 0.3914951, z: 58.432983} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -2693,9 +1868,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 5.5455265 + m_Target: 5.869256 speed: 2 - m_Value: 5.5455265 + m_Value: 5.869256 m_Ortho: m_Target: 1 speed: 2 @@ -2720,7 +1895,7 @@ MonoBehaviour: m_SceneVisActive: 1 m_LastLockedObject: {fileID: 0} m_ViewIsLockedToObject: 0 ---- !u!114 &23 +--- !u!114 &19 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2740,10 +1915,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 367 - y: 83 - width: 1091 - height: 524 + x: 412 + y: 73 + width: 1268 + height: 426 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -2791,29 +1966,29 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 1091 - height: 503 - m_Scale: {x: 0.46574077, y: 0.46574074} - m_Translation: {x: 545.5, y: 251.5} + width: 1268 + height: 405 + m_Scale: {x: 0.375, y: 0.375} + m_Translation: {x: 634, y: 202.5} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -1171.2524 + x: -1690.6666 y: -540 - width: 2342.505 + width: 3381.3333 height: 1080 m_MinimalGUI: 1 - m_defaultScale: 0.46574074 - m_LastWindowPixelSize: {x: 1091, y: 524} + m_defaultScale: 0.375 + m_LastWindowPixelSize: {x: 1268, y: 426} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 m_XRRenderMode: 0 m_RenderTexture: {fileID: 0} ---- !u!114 &24 +--- !u!114 &20 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2833,10 +2008,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 8 - y: 628 - width: 1451 - height: 355 + x: 0 + y: 520 + width: 1681 + height: 519 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default From 36c3be29d5023b772f624452f34b6514e522973a Mon Sep 17 00:00:00 2001 From: Johann Daflon Date: Sat, 24 Jun 2023 13:38:55 -0300 Subject: [PATCH 13/13] Corrigido ultimo merge Uma linha ficou faltando no merge --- chess-game-project/Assets/Scripts/AI.cs | 464 +++++++++++------- chess-game-project/Assets/Scripts/Chessman.cs | 5 +- .../Assets/Scripts/MovePlate.cs | 7 + 3 files changed, 291 insertions(+), 185 deletions(-) diff --git a/chess-game-project/Assets/Scripts/AI.cs b/chess-game-project/Assets/Scripts/AI.cs index 1b59d6e..6f3109f 100644 --- a/chess-game-project/Assets/Scripts/AI.cs +++ b/chess-game-project/Assets/Scripts/AI.cs @@ -1,7 +1,8 @@ using System; using System.Collections.Generic; -public class Move { +public class Move +{ public int x; public int y; public int destX; @@ -24,7 +25,8 @@ public Move(int _x, int _y, int _destX, int _destY, bool roque = false) this.roque = roque; attack = false; } - public Move(int _x, int _y, int _destX, int _destY, int _score){ + public Move(int _x, int _y, int _destX, int _destY, int _score) + { Board board = new Board(); // if (!board.VerifyInsideBoard(_destX, _destX) || !board.VerifyInsideBoard(_x, _y)) // { @@ -37,29 +39,35 @@ public Move(int _x, int _y, int _destX, int _destY, int _score){ score = _score; attack = true; } - static public Move Fake(){ - return new Move(0,0,0,0,-9999); + static public Move Fake() + { + return new Move(0, 0, 0, 0, -9999); } } -public class Piece { +public class Piece +{ public int enabled = 1; public int type; public int team; public int x; public int y; public bool move = false; - public Piece(int _type, int _team, int _x, int _y){ + public Piece(int _type, int _team, int _x, int _y) + { type = _type; team = _team; x = _x; y = _y; } - public int TypeToScore(){ - return this.type+1; - } - public Move[] Movement(Board board){ - switch(type){ + public int TypeToScore() + { + return this.type + 1; + } + public Move[] Movement(Board board) + { + switch (type) + { case 0: return this.pawn(board); // Peao case 1: return this.L(board); // Cavalo case 2: return this.cross(board); // Bispo @@ -68,8 +76,9 @@ public Move[] Movement(Board board){ } return this.adj(board); // Rei } - - public Move[] Queen(Board board){ + + public Move[] Queen(Board board) + { Move[] x = this.cross(board); Move[] y = this.Plus(board); Move[] z = new Move[x.Length + y.Length]; @@ -78,182 +87,238 @@ public Move[] Queen(Board board){ return z; } // 4 straight lines - public Move[] Plus(Board board){ - Piece piece = this; + public Move[] Plus(Board board) + { + Piece piece = this; List moves = new List(); int x = piece.x; int y = piece.y; - for(int i = x + 1; i < 8; i++){ + for (int i = x + 1; i < 8; i++) + { if (!board.VerifyInsideBoard(i, y)) continue; - if(board.GetPiece(i, y) == null){ - moves.Add(new Move(x,y, i,y)); - }else{ - if(board.GetPiece(i, y).team != piece.team){ - moves.Add(new Move(x,y, i,y, (board.GetPiece(i, y)).TypeToScore())); + if (board.GetPiece(i, y) == null) + { + moves.Add(new Move(x, y, i, y)); + } + else + { + if (board.GetPiece(i, y).team != piece.team) + { + moves.Add(new Move(x, y, i, y, (board.GetPiece(i, y)).TypeToScore())); } break; } } - - for(int i = x - 1; i >= 0; i--){ + + for (int i = x - 1; i >= 0; i--) + { if (!board.VerifyInsideBoard(i, y)) continue; - if(board.GetPiece(i, y) == null){ - moves.Add(new Move(x,y, i,y)); - }else{ - if(board.GetPiece(i, y).team != piece.team){ - moves.Add(new Move(x,y, i,y, (board.GetPiece(i, y)).TypeToScore())); + if (board.GetPiece(i, y) == null) + { + moves.Add(new Move(x, y, i, y)); + } + else + { + if (board.GetPiece(i, y).team != piece.team) + { + moves.Add(new Move(x, y, i, y, (board.GetPiece(i, y)).TypeToScore())); } break; } } - - for(int i = y + 1; i < 8; i++){ + + for (int i = y + 1; i < 8; i++) + { if (!board.VerifyInsideBoard(x, i)) continue; - if(board.GetPiece(x, i) == null){ - moves.Add(new Move(x,y, x,i)); - }else{ - if(board.GetPiece(x, i).team != piece.team){ - moves.Add(new Move(x,y, x,i, (board.GetPiece(x, i)).TypeToScore())); + if (board.GetPiece(x, i) == null) + { + moves.Add(new Move(x, y, x, i)); + } + else + { + if (board.GetPiece(x, i).team != piece.team) + { + moves.Add(new Move(x, y, x, i, (board.GetPiece(x, i)).TypeToScore())); } break; } } - - for(int i = y - 1; i >= 0; i--){ + + for (int i = y - 1; i >= 0; i--) + { if (!board.VerifyInsideBoard(x, i)) continue; - if(board.GetPiece(x, i) == null){ - moves.Add(new Move(x,y, x,i)); - }else{ - if(board.GetPiece(x, i).team != piece.team){ - moves.Add(new Move(x,y, x,i, (board.GetPiece(x, i)).TypeToScore())); + if (board.GetPiece(x, i) == null) + { + moves.Add(new Move(x, y, x, i)); + } + else + { + if (board.GetPiece(x, i).team != piece.team) + { + moves.Add(new Move(x, y, x, i, (board.GetPiece(x, i)).TypeToScore())); } break; } } - + return moves.ToArray(); } // 4 diagonals - public Move[] cross(Board board){ - Piece piece = this; + public Move[] cross(Board board) + { + Piece piece = this; List moves = new List(); int x = piece.x; int y = piece.y; - for(int i = 1; (i+x < 8) && (i+y < 8); i++){ + for (int i = 1; (i + x < 8) && (i + y < 8); i++) + { if (!board.VerifyInsideBoard(x + i, y + i)) continue; - if(board.GetPiece(x+i, y+i) == null){ - moves.Add(new Move(x,y, x+i, y+i)); - }else{ - if(board.GetPiece(x+i, y+i).team != piece.team){ - moves.Add(new Move(x,y, x+i,y+i, (board.GetPiece(x+i,y+i)).TypeToScore())); + if (board.GetPiece(x + i, y + i) == null) + { + moves.Add(new Move(x, y, x + i, y + i)); + } + else + { + if (board.GetPiece(x + i, y + i).team != piece.team) + { + moves.Add(new Move(x, y, x + i, y + i, (board.GetPiece(x + i, y + i)).TypeToScore())); } break; } } - - for(int i = -1; (i+x >= 0) && (i+y >= 0); i--){ + + for (int i = -1; (i + x >= 0) && (i + y >= 0); i--) + { if (!board.VerifyInsideBoard(x + i, y + i)) continue; - if(board.GetPiece(x+i, y+i) == null){ - moves.Add(new Move(x,y, x+i, y+i)); - }else{ - if(board.GetPiece(x+i, y+i).team != piece.team){ - moves.Add(new Move(x,y, x+i,y+i, (board.GetPiece(x+i,y+i)).TypeToScore())); + if (board.GetPiece(x + i, y + i) == null) + { + moves.Add(new Move(x, y, x + i, y + i)); + } + else + { + if (board.GetPiece(x + i, y + i).team != piece.team) + { + moves.Add(new Move(x, y, x + i, y + i, (board.GetPiece(x + i, y + i)).TypeToScore())); } break; } } - - for(int i = 1; (i+x < 8) && (i-y >= 0); i++){ + + for (int i = 1; (i + x < 8) && (i - y >= 0); i++) + { if (!board.VerifyInsideBoard(x + i, i - y)) continue; - if(board.GetPiece(x+i, i-y) == null){ - moves.Add(new Move(x,y, x+i, i-y)); - }else{ - if(board.GetPiece(x+i, i-y).team != piece.team){ - moves.Add(new Move(x,y, x+i,i-y, (board.GetPiece(x+i,i-y)).TypeToScore())); + if (board.GetPiece(x + i, i - y) == null) + { + moves.Add(new Move(x, y, x + i, i - y)); + } + else + { + if (board.GetPiece(x + i, i - y).team != piece.team) + { + moves.Add(new Move(x, y, x + i, i - y, (board.GetPiece(x + i, i - y)).TypeToScore())); } break; } } - - for(int i = 1; (i-x >= 0) && (i+y < 8); i++){ + + for (int i = 1; (i - x >= 0) && (i + y < 8); i++) + { if (!board.VerifyInsideBoard(i - x, y + i)) continue; - if(board.GetPiece(i-x, y+i) == null){ - moves.Add(new Move(x,y, i-x, y+i)); - }else{ - if(board.GetPiece(i-x, y+i).team != piece.team){ - moves.Add(new Move(x,y, i-x,y+i, (board.GetPiece(i-x,y+i)).TypeToScore())); + if (board.GetPiece(i - x, y + i) == null) + { + moves.Add(new Move(x, y, i - x, y + i)); + } + else + { + if (board.GetPiece(i - x, y + i).team != piece.team) + { + moves.Add(new Move(x, y, i - x, y + i, (board.GetPiece(i - x, y + i)).TypeToScore())); } break; } } - + return moves.ToArray(); } // Adjacent squares - public Move[] adj(Board board){ - Piece piece = this; + public Move[] adj(Board board) + { + Piece piece = this; Piece target; - List moves = new List(); - int x = piece.x; + List moves = new List(); + int x = piece.x; int y = piece.y; - for(int i = -1; i <= 1; i+=2){ + for (int i = -1; i <= 1; i += 2) + { if (!board.VerifyInsideBoard(piece.x + i, piece.y)) continue; - target = board.GetPiece(x+i, y); - if(target == null){ - moves.Add(new Move(x,y, x+i, y)); - }else if(target.team != piece.team){ - moves.Add(new Move(x,y, x+i,y, target.TypeToScore())); - } - } - for(int i = -1; i <= 1; i+=2){ + target = board.GetPiece(x + i, y); + if (target == null) + { + moves.Add(new Move(x, y, x + i, y)); + } + else if (target.team != piece.team) + { + moves.Add(new Move(x, y, x + i, y, target.TypeToScore())); + } + } + for (int i = -1; i <= 1; i += 2) + { if (!board.VerifyInsideBoard(piece.x, piece.y + i)) continue; - target = board.GetPiece(x, y+i); - if(target == null){ - moves.Add(new Move(x,y, x,y+i)); - }else if(target.team != piece.team){ - moves.Add(new Move(x,y, x,y+i, target.TypeToScore())); - } - } - - for(int i = -1; i <= 1; i+=2){ - for(int z = -1; z <= 1; z+=2){ + target = board.GetPiece(x, y + i); + if (target == null) + { + moves.Add(new Move(x, y, x, y + i)); + } + else if (target.team != piece.team) + { + moves.Add(new Move(x, y, x, y + i, target.TypeToScore())); + } + } + + for (int i = -1; i <= 1; i += 2) + { + for (int z = -1; z <= 1; z += 2) + { if (!board.VerifyInsideBoard(piece.x + i, piece.y + z)) continue; - target = board.GetPiece(x+i, y+z); - if(target == null){ - moves.Add(new Move(x,y, x+i, y+z)); - }else if(target.team != piece.team){ - moves.Add(new Move(x,y, x+i, y+z, target.TypeToScore())); - } - } - } + target = board.GetPiece(x + i, y + z); + if (target == null) + { + moves.Add(new Move(x, y, x + i, y + z)); + } + else if (target.team != piece.team) + { + moves.Add(new Move(x, y, x + i, y + z, target.TypeToScore())); + } + } + } if (!piece.move) { if (piece.team == 0) { - if (board.GetPiece(0,0) != null && !board.GetPiece(0, 0).move && VerifyRoque(board, 0)) + if (board.GetPiece(0, 0) != null && !board.GetPiece(0, 0).move && VerifyRoque(board, 0)) { - moves.Add(new Move(x,y, 0,0, roque: true)); - } + moves.Add(new Move(x, y, 0, 0, roque: true)); + } if (board.GetPiece(7, 0) != null && !board.GetPiece(7, 0).move && VerifyRoque(board, 7)) { - moves.Add(new Move(x,y, 0,0, roque: true)); + moves.Add(new Move(x, y, 0, 0, roque: true)); } } else { - if (board.GetPiece(0,7) != null && !board.GetPiece(0, 7).move && VerifyRoque(board, 0)) + if (board.GetPiece(0, 7) != null && !board.GetPiece(0, 7).move && VerifyRoque(board, 0)) { - moves.Add(new Move(x,y, 0,7, roque: true)); - } - if (board.GetPiece(7,7) != null && !board.GetPiece(7, 7).move && VerifyRoque(board, 7)) + moves.Add(new Move(x, y, 0, 7, roque: true)); + } + if (board.GetPiece(7, 7) != null && !board.GetPiece(7, 7).move && VerifyRoque(board, 7)) { - moves.Add(new Move(x,y, 7,7, roque: true)); - } + moves.Add(new Move(x, y, 7, 7, roque: true)); + } } } return moves.ToArray(); - } + } public bool VerifyRoque(Board board, int x) { @@ -272,18 +337,19 @@ public bool VerifyRoque(Board board, int x) return true; } } - + // Adjacent squares - public Move[] pawn(Board board){ - Piece piece = this; + public Move[] pawn(Board board) + { + Piece piece = this; Piece target; - List moves = new List(); - - int firstMove = 0; - int delta = 0; - if(piece.team == 0){delta = 1;if(piece.y == 1){firstMove = 1;}} - if(piece.team == 1){delta = -1;if(piece.y == 6){firstMove = 1;}} - if(board.VerifyInsideBoard(piece.x, piece.y + delta)) + List moves = new List(); + + int firstMove = 0; + int delta = 0; + if (piece.team == 0) { delta = 1; if (piece.y == 1) { firstMove = 1; } } + if (piece.team == 1) { delta = -1; if (piece.y == 6) { firstMove = 1; } } + if (board.VerifyInsideBoard(piece.x, piece.y + delta)) { if (board.GetPiece(piece.x, piece.y + delta) == null) { @@ -293,38 +359,46 @@ public Move[] pawn(Board board){ if (board.GetPiece(piece.x, piece.y + delta * 2) == null) { // Só vale pra casa inicial - moves.Add(new Move(piece.x, piece.y, piece.x, piece.y + delta*2)); + moves.Add(new Move(piece.x, piece.y, piece.x, piece.y + delta * 2)); } } } } - for(int ii = -1; ii <= 1; ii+=2) + for (int ii = -1; ii <= 1; ii += 2) { - if (!board.VerifyInsideBoard(piece.x + ii, piece.y + delta)) continue; + if (!board.VerifyInsideBoard(piece.x + ii, piece.y + delta)) continue; target = board.GetPiece(piece.x + ii, piece.y + delta); - if(target != null && target.team != this.team){ + if (target != null && target.team != this.team) + { moves.Add(new Move(piece.x, piece.y, piece.x + ii, piece.y + delta, target.TypeToScore())); } } return moves.ToArray(); - } - public Move[] L(Board board){ - Piece piece = this; + } + public Move[] L(Board board) + { + Piece piece = this; List moves = new List(); Piece target; int x = piece.x; int y = piece.y; - for(int i = -1; i <= 1; i+=2){ // Invert Y - for(int z = 0; z <= 1; z++){ // Change x and y sizes - for(int w = -1; w <= 1; w+=2){ // Invert x - x = (1+z)*w; - y = (2-z)*i; + for (int i = -1; i <= 1; i += 2) + { // Invert Y + for (int z = 0; z <= 1; z++) + { // Change x and y sizes + for (int w = -1; w <= 1; w += 2) + { // Invert x + x = (1 + z) * w; + y = (2 - z) * i; if (!board.VerifyInsideBoard(piece.x + x, piece.y + y)) continue; - target = board.GetPiece(piece.x + x,piece.y + y); - if(target == null){ - moves.Add(new Move(piece.x,piece.y, piece.x+x, piece.y+y)); - }else if(target.team != piece.team){ - moves.Add(new Move(piece.x,piece.y, piece.x+x, piece.y+y, target.TypeToScore())); + target = board.GetPiece(piece.x + x, piece.y + y); + if (target == null) + { + moves.Add(new Move(piece.x, piece.y, piece.x + x, piece.y + y)); + } + else if (target.team != piece.team) + { + moves.Add(new Move(piece.x, piece.y, piece.x + x, piece.y + y, target.TypeToScore())); } } } @@ -332,24 +406,33 @@ public Move[] L(Board board){ return moves.ToArray(); } } -public class Board { - public Piece[,] positions = new Piece[8,8]; +public class Board +{ + public Piece[,] positions = new Piece[8, 8]; public List wPieces = new(); public List bPieces = new(); - public void AddPiece(int type, int team, int x, int y){ + public void AddPiece(int type, int team, int x, int y) + { Piece p = new Piece(type, team, x, y); - positions[x, y] = p; - if(team == 0) { + positions[x, y] = p; + if (team == 0) + { wPieces.Add(p); - }else { + } + else + { bPieces.Add(p); } } - public void AddPiece(Piece p){ - positions[p.x, p.y] = p; - if(p.team == 0) { + public void AddPiece(Piece p) + { + positions[p.x, p.y] = p; + if (p.team == 0) + { wPieces.Add(p); - }else { + } + else + { bPieces.Add(p); } } @@ -366,28 +449,34 @@ public void RemovePiece(Piece p) bPieces.Remove(p); } } - - public Piece[] GetPieces(int turn) { + + public Piece[] GetPieces(int turn) + { List resp = new List(); - if(turn == 0){ + if (turn == 0) + { foreach (var p in wPieces) { - if(p != null && p.enabled == 1){resp.Add(p);} + if (p != null && p.enabled == 1) { resp.Add(p); } } - - }else{ + + } + else + { foreach (var p in bPieces) { - if(p != null && p.enabled == 1){resp.Add(p);} + if (p != null && p.enabled == 1) { resp.Add(p); } } } return resp.ToArray(); } - public Piece GetPiece(int x, int y){ - return this.positions[x,y]; + public Piece GetPiece(int x, int y) + { + return this.positions[x, y]; } - public void SetPiece(int x, int y, Piece p){ - this.positions[x,y] = p; + public void SetPiece(int x, int y, Piece p) + { + this.positions[x, y] = p; } public bool VerifyInsideBoard(int x, int y) @@ -396,7 +485,8 @@ public bool VerifyInsideBoard(int x, int y) return false; return true; } - public void _move(Move _move){ + public void _move(Move _move) + { if (_move.roque) RoqueMove(_move.x, _move.y, _move.destX, _move.destY); else @@ -432,17 +522,18 @@ private void RoqueRMove(int x, int y, int xd, int yd) } } - public void Move(int x, int y, int xd, int yd){ - positions[x,y].x = xd; - positions[x,y].y = yd; - positions[xd,yd] = this.positions[x,y]; - positions[xd,yd].move = true; - positions[x,y] = null; + public void Move(int x, int y, int xd, int yd) + { + positions[x, y].x = xd; + positions[x, y].y = yd; + positions[xd, yd] = this.positions[x, y]; + positions[xd, yd].move = true; + positions[x, y] = null; } public void RoqueMove(int x, int y, int xd, int yd) { - if(positions[x,y].x == 0) + if (positions[x, y].x == 0) { positions[x, y].x = 2; positions[2, y] = this.positions[x, y]; @@ -463,27 +554,34 @@ public void RoqueMove(int x, int y, int xd, int yd) } } -public class AI{ - public static Move BestChoice(Board board, int turn, int depth){ +public class AI +{ + public static Move BestChoice(Board board, int turn, int depth) + { return _bestChoice(board, turn, depth, turn, -1, 9999); } - private static Move _bestChoice(Board board, int turn, int depth, int maxmizeTurn, int alpha, int beta){ + private static Move _bestChoice(Board board, int turn, int depth, int maxmizeTurn, int alpha, int beta) + { Piece _p; Move bestMove = Move.Fake(); - foreach(var p in board.GetPieces(turn)){ - foreach(var m in p.Movement(board)){ + foreach (var p in board.GetPieces(turn)) + { + foreach (var m in p.Movement(board)) + { // Console.WriteLine("T"+turn +" - "+ m.x +" "+ m.y + " -> " + m.destX +" "+ m.destY +" $"+ m.score); - if(depth > 0){ + if (depth > 0) + { _p = board.GetPiece(m.destX, m.destY); - if(_p != null) board.RemovePiece(_p); + if (_p != null) board.RemovePiece(_p); board._move(m); // Possivelmente parte de um bug (1) - m.score += _bestChoice(board, (turn+1)%2, depth-1, maxmizeTurn, alpha, beta).score; // Recursive Score + m.score += _bestChoice(board, (turn + 1) % 2, depth - 1, maxmizeTurn, alpha, beta).score; // Recursive Score board._rMove(m); // Possivelmente parte de um bug (2) board.SetPiece(m.destX, m.destY, _p); - if(_p != null) board.AddPiece(_p); + if (_p != null) board.AddPiece(_p); } - if(m.score > bestMove.score){ // Max(this, last) + if (m.score > bestMove.score) + { // Max(this, last) bestMove = m; // if(turn == maxmizeTurn){ // if(m.score > alpha){ @@ -511,7 +609,7 @@ public static Move RandomChoice(Board board, int turn) List pieces = new List(); foreach (var piece in board.GetPieces(turn)) { - if(piece.Movement(board).Length > 0) + if (piece.Movement(board).Length > 0) pieces.Add(piece); } Random r = new Random(); @@ -522,5 +620,5 @@ public static Move RandomChoice(Board board, int turn) return movePiece[index]; } - + } \ No newline at end of file diff --git a/chess-game-project/Assets/Scripts/Chessman.cs b/chess-game-project/Assets/Scripts/Chessman.cs index 9f39d3c..5b0a846 100644 --- a/chess-game-project/Assets/Scripts/Chessman.cs +++ b/chess-game-project/Assets/Scripts/Chessman.cs @@ -558,8 +558,9 @@ public void MovePlateIaSpawn(int matrixX, int matrixY, GameObject gc, bool attac // Cria uma instância do moveplate e interage com essa instância, flag attack = true. MovePlate mpScript = mp.GetComponent(); mpScript.attack = attack; - mpScript.SetReference(gameObject); - mpScript.SetCoordinates(matrixX, matrixY); + mpScript.SetReference(gc); + mpScript.SetCoordinates(matrixX, matrixY); ; + mpScript.OnMouseUp(); } private Piece[] SetWhitePieces(GameObject[] whitePieces) diff --git a/chess-game-project/Assets/Scripts/MovePlate.cs b/chess-game-project/Assets/Scripts/MovePlate.cs index be975c0..b6009c8 100644 --- a/chess-game-project/Assets/Scripts/MovePlate.cs +++ b/chess-game-project/Assets/Scripts/MovePlate.cs @@ -39,6 +39,12 @@ public void Start() } } + if (promote) + { + // a cor da sprite muda para roxo + gameObject.GetComponent().color = new Color(0.6f, 0.2f, 0.6f, 1.0f); + } + if (roque) { gameObject.GetComponent().color = new Color(1.0f, .5f, 0.0f, 1.0f); @@ -127,6 +133,7 @@ public void Movement() { EatMovement(); } + controller.GetComponent().SetPositionEmpty(reference.GetComponent().GetXBoard(), reference.GetComponent().GetYBoard()); reference.GetComponent().SetXBoard(matrixX);