Ejemplo n.º 1
0
 public void LoadStageSelect()
 {
     if (gameManager != null || NGameManager.TryGetInstance(out gameManager))
     {
         gameManager.LoadRandomLevel();
     }
 }
Ejemplo n.º 2
0
 public void SetPlayerCharacterChoices(int[] c)
 {
     if (gameManager != null || NGameManager.TryGetInstance(out gameManager))
     {
         gameManager.SetPlayerCharacterChoices(c);
     }
 }
Ejemplo n.º 3
0
 public void SetRounds(int r)
 {
     if (gameManager != null || NGameManager.TryGetInstance(out gameManager))
     {
         gameManager.SetRounds(r);
     }
 }
Ejemplo n.º 4
0
    private IEnumerator EndSequence()
    {
        yield return(new WaitForSeconds(2.5f));

        if (gameManager != null || NGameManager.TryGetInstance(out gameManager))
        {
            gameManager.LoadRandomLevel();
        }
    }
Ejemplo n.º 5
0
 void Start()
 {
     eventSystem = EventSystem.current;
     fightButton.onClick.AddListener(ToCharacterSelect);
     characterSelectManager.SetActive(false);
     if (NGameManager.TryGetInstance(out gameManager))
     {
         gameManager.SetEventSystemSelected(fightButton.gameObject);
     }
 }
Ejemplo n.º 6
0
 public static bool TryGetInstance(out NGameManager gm)
 {
     gm = instance;
     if (instance == null)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Debug.Log("Instance already exists, destroying object!");
         Destroy(this);
     }
 }
Ejemplo n.º 8
0
 void Start()
 {
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
         return;
     }
     else
     {
         gameData.playerWins = new int[4] {
             0, 0, 0, 0
         };
     }
     DontDestroyOnLoad(gameObject);
     instance = this;
 }
Ejemplo n.º 9
0
 void Start()
 {
     cam         = Camera.main;
     cameraQueue = new Queue <IEnumerator>();
     players     = new Dictionary <GameObject, NPlayerController>();
     for (int i = 0; i < 4; i++)
     {
         players.Add(playersObject.GetChild(i).gameObject, playersObject.GetChild(i).GetComponent <NPlayerController>());
     }
     spawnPoints = new LinkedList <Transform>();
     for (int i = 0; i < spawnPointsObject.childCount; i++)
     {
         spawnPoints.AddLast(spawnPointsObject.GetChild(i));
     }
     if (NGameManager.TryGetInstance(out gameManager))
     {
         gameData = gameManager.SetLevelManager(this);
     }
     Initialize();
     StartSequence();
 }
Ejemplo n.º 10
0
 private void Awake()
 {
     manager = this;
     timer   = timervals[MasterManager.mm.difficulty];
 }