/// Start of the Init state /// private void EnterStateInit() { // Load the level if (s_levelData == null) { s_levelData = m_levelLoader.GetLevel(m_view.LevelIndex).Clone(); } // Create the possible tiles foreach (var tile in TileIdentifiers.k_availableTiles) { // Create the tile toggle var toggleObject = ResourceUtils.LoadAndInstantiateGameObject(k_togglePrefab, m_view.TilesHolder, tile.ToString()); var toggleView = toggleObject.GetComponent <TileToggleView>(); toggleView.SetTileColour(tile, string.Format(k_tileText, tile.ToString())); m_tileToggles.Add(tile, toggleView); } m_fsm.ExecuteAction(k_actionLoad); }
/// @param levelIndex /// The index of the level to check /// /// @return Whether the level data exists /// public bool HasLevel(int levelIndex) { return(m_levelLoader.GetLevel(levelIndex) != null); }