public static int AddSandboxParts(string levelName, BasePart.PartType part, int count, bool showUnlockAnimations = true) { if (showUnlockAnimations) { GameProgress.m_data.AddToInt(levelName + "_part_unlocked_" + part.ToString(), count, int.MinValue, int.MaxValue); } return(GameProgress.m_data.AddToInt(levelName + "_part_" + part.ToString(), count, int.MinValue, int.MaxValue)); }
private void ReadPartOrder() { this.m_partOrder.Clear(); string text = this.m_gameData.m_partOrderList.text; char[] separator = new char[] { '\n' }; string[] array = text.Split(separator); int num = 0; foreach (string text2 in array) { string text3 = text2.Trim(); if (text3 != string.Empty) { BasePart.PartType key = BasePart.PartType.Unknown; foreach (GameObject gameObject in this.m_gameData.m_parts) { BasePart.PartType partType = gameObject.GetComponent <BasePart>().m_partType; if (partType.ToString() == text3) { key = partType; break; } } this.m_partOrder[key] = num; num++; } } }
private void SetRewardGiven(BasePart.PartType type, bool given) { if (given && this.rewards.Contains(type)) { this.rewards.Remove(type); } if (given) { this.RewardsGiven++; } GameProgress.SetBool("Pre_RewardGiven_" + type.ToString(), given, GameProgress.Location.Local); }
private BasePart.PartType PartNameToType(string name) { BasePart.PartType result = BasePart.PartType.Unknown; foreach (GameObject gameObject in this.m_parts) { BasePart.PartType partType = gameObject.GetComponent <BasePart>().m_partType; if (partType.ToString() == name) { result = partType; break; } } return(result); }
private bool GetRewardGiven(BasePart.PartType type) { return(GameProgress.GetBool("Pre_RewardGiven_" + type.ToString(), false, GameProgress.Location.Local, null)); }
public static int GetLastUsedPartIndex(BasePart.PartType partType) { return(UserSettings.GetInt("LastUsed_" + partType.ToString(), 0)); }
public static void SetLastUsedPartIndex(BasePart.PartType partType, int index) { UserSettings.SetInt("LastUsed_" + partType.ToString(), index); }
public static void SetUnlockedSandboxPartCount(string levelName, BasePart.PartType part, int count) { string key = levelName + "_part_unlocked_" + part.ToString(); GameProgress.m_data.SetInt(key, count); }
public static void SetUnlockedSandboxPartCount(BasePart.PartType part, int count) { GameProgress.m_data.SetInt("part_unlocked_" + part.ToString(), count); }
public static int GetUnlockedSandboxPartCount(string levelName, BasePart.PartType part) { string key = levelName + "_part_unlocked_" + part.ToString(); return(GameProgress.m_data.GetInt(key, 0)); }
public static int GetUnlockedSandboxPartCount(BasePart.PartType part) { return(GameProgress.m_data.GetInt("part_unlocked_" + part.ToString(), 0)); }