|
|
@@ -14,13 +14,23 @@ public class ChallengeOptionView : MonoBehaviour
|
|
|
}
|
|
|
|
|
|
public void StartGame(int gameType) {
|
|
|
- if (GlobalData.pkMatchType == PKMatchType.LocalPK) {
|
|
|
+ AudioMgr.ins.PlayBtn();
|
|
|
+ if (GlobalDataTemp.pkMatchType == PKMatchType.OnlinePK) {
|
|
|
+ int roomType = 0;
|
|
|
+ if (gameType == 3) roomType = 1;
|
|
|
+ else if (gameType == 4) roomType = 2;
|
|
|
+ else if (gameType == 5) roomType = 3;
|
|
|
+ GlobalDataTemp.matchRoomType = roomType;
|
|
|
+ GameObject.Instantiate(GameObject.Find("WindowViews").transform.Find("PKMatchView").gameObject).SetActive(true);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (GlobalDataTemp.pkMatchType == PKMatchType.LocalPK) {
|
|
|
if (gameType == 3) gameType = 6;
|
|
|
else if (gameType == 4) gameType = 7;
|
|
|
else if (gameType == 5) gameType = 8;
|
|
|
}
|
|
|
+ GlobalData.pkMatchType = GlobalDataTemp.pkMatchType;
|
|
|
GameMgr.gameType = gameType;
|
|
|
- AudioMgr.ins.PlayBtn();
|
|
|
SceneManager.LoadScene("GameChallenge", LoadSceneMode.Single);
|
|
|
}
|
|
|
|