private void OnEnable() { levelNodes.ForEach(node => node.SetActive(false)); int[,,] tempRegion = WordDatav2.RegionUnlocks(GameMaster.Region); //int[,,] tempRegion = new int[2, 3, 25] // { { { 00, 00, 00, 00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //{ 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, //{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, //{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } }; int levelCount = 0; levelNodes[0].SetActive(true); while (tempRegion[0, GameMaster.Difficulty, levelCount] > 0) { levelCount++; if (levelCount == 25) {//region fully unlocked, maybe do something here? break; } if (levelCount <= 24) { levelNodes[levelCount].SetActive(true); } } }
public static void LoadSplit(string Loadstr) { string[] tempLoad = Loadstr.Split('#'); if (tempLoad.Length > 0) { WordDatav2.LoadManagerData(tempLoad[0]); InvManager.LoadManager(tempLoad[1]); CharectorStats.LoadManagerData(tempLoad[2]); } }
public static void StartLevel() //called on awake for { WordsIndex = WordDatav2.GetDataLevel(GameMaster.Region, GameMaster.Level, GameMaster.Difficulty); Words = new List <string> { }; //WordsIndex = WordDatav2.GetDataLevel(0,0,0); GetActualWords(); wordBreak(0); InitializeLetters(); onMaxLengthFound?.Invoke(longestWord.Count()); }
public static string SaveParse() { string tempSave = ""; tempSave += WordDatav2.SaveManagerData(); tempSave += '#'; tempSave += InvManager.SaveManager(); tempSave += '#'; tempSave += CharectorStats.SaveManagerData(); return(tempSave); }
void levelFinished() { GameMaster.lastCompletedLevel = GameMaster.Level; InvManager.GoldAdd(stagedGold); stagedGold = 0; InvManager.T1ShardAdd(stagedShard1); stagedShard1 = 0; InvManager.T2ShardAdd(stagedShard2); stagedShard2 = 0; WordDatav2.endOfLevelStats(region, difficulty, level, 10, 3); vicDefPanel.SetActive(true); }