ChallengeOptionView.cs 670 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.SceneManagement;
  5. public class ChallengeOptionView : MonoBehaviour
  6. {
  7. public void StartGame(int gameType) {
  8. if (GlobalData.pkMatchType == PKMatchType.LocalPK) {
  9. if (gameType == 3) gameType = 6;
  10. else if (gameType == 4) gameType = 7;
  11. else if (gameType == 5) gameType = 8;
  12. }
  13. GameMgr.gameType = gameType;
  14. AudioMgr.ins.PlayBtn();
  15. SceneManager.LoadScene("GameChallenge", LoadSceneMode.Single);
  16. }
  17. public void back() {
  18. AudioMgr.ins.PlayBtn();
  19. Destroy(this.gameObject);
  20. }
  21. }