예제 #1
0
파일: Pawn.cs 프로젝트: YosufE/chess-unity
        public void handle_upgrade(Vector3Int oldCell, Vector3Int newCell)
        {
            if ((inverted && newCell.y == 1) || (inverted == false && newCell.y == 8))
            {
                disable_all_piece_colliders();

                GameObject upgradeMenuGameObject = Instantiate(upgradeMenuPrefab);
                upgradeMenu = (UpgradeMenu)upgradeMenuGameObject.GetComponentInChildren(typeof(UpgradeMenu));
                upgradeMenu.connectedPawn = this;
                upgradeMenu.connectButtons();
            }
        }