| 12345678910111213141516171819202122232425262728293031 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- public class ChallengeOptionView : MonoBehaviour
- {
- void Start() {
- HomeMgr.CacheView(this);
- }
- void OnDestroy() {
- HomeMgr.RemoveCacheView(this);
- }
- public void StartGame(int gameType) {
- if (GlobalData.pkMatchType == PKMatchType.LocalPK) {
- if (gameType == 3) gameType = 6;
- else if (gameType == 4) gameType = 7;
- else if (gameType == 5) gameType = 8;
- }
- GameMgr.gameType = gameType;
- AudioMgr.ins.PlayBtn();
- SceneManager.LoadScene("GameChallenge", LoadSceneMode.Single);
- }
- public void back() {
- AudioMgr.ins.PlayBtn();
- Destroy(this.gameObject);
- }
- }
|