public int[,,] UpdateMap() { if (lifeEngine == null) { if (map == null) { GenerateInitialGameOfLifeMap(); } lifeEngine = new LifeEngine(map); } for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { for (int z = 0; z < depth; z++) { map[x, y, z] = lifeEngine.CalcCellInSuperCube(x, y, z); } } } return(map); }
void Start() { timesLeftTexT.gameObject.SetActive(false); lifeEngine = FindObjectOfType <LifeEngine>(); lifeEngine.SetActiveScene("start"); }
private void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); } else { instance = this; DontDestroyOnLoad(this.gameObject); } }
void Start() { Debug.Log("game over scene"); LanguageSupport langSupport = FindObjectOfType <LanguageSupport>(); gameOverText.text = langSupport.GetText("gameover"); tryAgainText.text = langSupport.GetText("tryagain"); timesLeftTexT.gameObject.SetActive(false); lifeEngine = FindObjectOfType <LifeEngine>(); lifeEngine.SetActiveScene("gameover"); }
void Start() { GenerateMap(); lifeEngine = new LifeEngine(map); StartCoroutine(UpdateMap()); }