public void LoadStageSelect() { if (gameManager != null || NGameManager.TryGetInstance(out gameManager)) { gameManager.LoadRandomLevel(); } }
public void SetPlayerCharacterChoices(int[] c) { if (gameManager != null || NGameManager.TryGetInstance(out gameManager)) { gameManager.SetPlayerCharacterChoices(c); } }
public void SetRounds(int r) { if (gameManager != null || NGameManager.TryGetInstance(out gameManager)) { gameManager.SetRounds(r); } }
private IEnumerator EndSequence() { yield return(new WaitForSeconds(2.5f)); if (gameManager != null || NGameManager.TryGetInstance(out gameManager)) { gameManager.LoadRandomLevel(); } }
void Start() { eventSystem = EventSystem.current; fightButton.onClick.AddListener(ToCharacterSelect); characterSelectManager.SetActive(false); if (NGameManager.TryGetInstance(out gameManager)) { gameManager.SetEventSystemSelected(fightButton.gameObject); } }
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); } }
void Start() { if (instance != null && instance != this) { Destroy(gameObject); return; } else { gameData.playerWins = new int[4] { 0, 0, 0, 0 }; } DontDestroyOnLoad(gameObject); instance = this; }
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(); }
private void Awake() { manager = this; timer = timervals[MasterManager.mm.difficulty]; }