DO-33 [Style] main브랜치 pull이후 코드 정리
This commit is contained in:
parent
1e3af84ff6
commit
302596b1fb
@ -151,7 +151,7 @@ public class GameLogic : MonoBehaviour
|
|||||||
new int[] {1, -1} // 대각선 ↙ ↗
|
new int[] {1, -1} // 대각선 ↙ ↗
|
||||||
};
|
};
|
||||||
|
|
||||||
public GameLogic(StoneController stoneController, Enums.GameType gameType, FioTimer fioTimer)
|
public GameLogic(StoneController stoneController, Enums.GameType gameType, FioTimer fioTimer = null)
|
||||||
{
|
{
|
||||||
//보드 초기화
|
//보드 초기화
|
||||||
_board = new Enums.PlayerType[15, 15];
|
_board = new Enums.PlayerType[15, 15];
|
||||||
@ -164,22 +164,28 @@ public class GameLogic : MonoBehaviour
|
|||||||
_lastRow = -1;
|
_lastRow = -1;
|
||||||
_lastCol = -1;
|
_lastCol = -1;
|
||||||
//timer 초기화
|
//timer 초기화
|
||||||
this.fioTimer = fioTimer;
|
if (fioTimer != null)
|
||||||
this.fioTimer.InitTimer();
|
|
||||||
//timer 시간초과시 진행 함수
|
|
||||||
this.fioTimer.OnTimeout = () =>
|
|
||||||
{
|
{
|
||||||
if (currentTurn == Enums.PlayerType.PlayerA)
|
this.fioTimer = fioTimer;
|
||||||
|
this.fioTimer.InitTimer();
|
||||||
|
//timer 시간초과시 진행 함수
|
||||||
|
this.fioTimer.OnTimeout = () =>
|
||||||
{
|
{
|
||||||
GameManager.Instance.OpenConfirmPanel($"Game Over: {Enums.PlayerType.PlayerB} Win",() =>{});
|
if (currentTurn == Enums.PlayerType.PlayerA)
|
||||||
EndGame();
|
{
|
||||||
}
|
GameManager.Instance.OpenConfirmPanel($"Game Over: {Enums.PlayerType.PlayerB} Win",
|
||||||
else if (currentTurn == Enums.PlayerType.PlayerB)
|
() =>{});
|
||||||
{
|
EndGame();
|
||||||
GameManager.Instance.OpenConfirmPanel($"Game Over: {Enums.PlayerType.PlayerA} Win",() =>{});
|
}
|
||||||
EndGame();
|
else if (currentTurn == Enums.PlayerType.PlayerB)
|
||||||
}
|
{
|
||||||
};
|
GameManager.Instance.OpenConfirmPanel($"Game Over: {Enums.PlayerType.PlayerA} Win",
|
||||||
|
() =>{});
|
||||||
|
EndGame();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
//TODO: 기보 매니저에게 플레이어 닉네임 넘겨주기
|
//TODO: 기보 매니저에게 플레이어 닉네임 넘겨주기
|
||||||
ReplayManager.Instance.InitReplayData("PlayerA","nicknameB");
|
ReplayManager.Instance.InitReplayData("PlayerA","nicknameB");
|
||||||
|
|
||||||
@ -193,6 +199,9 @@ public class GameLogic : MonoBehaviour
|
|||||||
case Enums.GameType.MultiPlay:
|
case Enums.GameType.MultiPlay:
|
||||||
//TODO: 멀티 구현 필요
|
//TODO: 멀티 구현 필요
|
||||||
break;
|
break;
|
||||||
|
case Enums.GameType.Replay:
|
||||||
|
//TODO: 리플레이 구현
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//착수 버튼 클릭시 호출되는 함수
|
//착수 버튼 클릭시 호출되는 함수
|
||||||
|
Loading…
x
Reference in New Issue
Block a user