public void UnlockCombo(ComboBase combo) { if (!GetInstance().m_unlockedComboStrings.Contains(combo.GetGuid())) { GetInstance().m_unlockedComboStrings.Add(combo.GetGuid()); } }
public override void OnInspectorGUI() { ComboBase combo = target as ComboBase; if (combo == null) { EditorGUILayout.LabelField("WARNING: something in the inspector went wrong!"); EditorGUILayout.LabelField(" ", " "); EditorGUILayout.LabelField("WARNING: Reward type has not been set", "WARNING: Reward type has not been set"); return; } EditorGUILayout.LabelField("Script", combo.GetType().ToString()); EditorGUILayout.LabelField("Guid", combo.GetGuid()); if (GUILayout.Button("Generate New Guid")) { ((ComboBase)target).GenerateNewGuid(); } EditorGUILayout.Space(); combo.GUIReadableName = EditorGUILayout.TextField("GUI Combo Name: ", combo.GUIReadableName); EditorGUILayout.LabelField("GUI Combo Description:"); combo.GUIDescription = EditorGUILayout.TextArea(combo.GUIDescription); EditorGUILayout.Space(); combo.GUIAwardType = (ComboBase.EComboRewardType)EditorGUILayout.EnumPopup("Reward to give:", combo.GUIAwardType); switch (combo.GUIAwardType) { case ComboBase.EComboRewardType.CRT_StaticAmount: combo.GUIMoneyReward = EditorGUILayout.IntField("Money to be given: ", combo.GUIMoneyReward); combo.GUIXpReward = EditorGUILayout.IntField("xp to be given:", combo.GUIXpReward); combo.GUIRollBonusPointReward = EditorGUILayout.IntField("Roll Bonus Points to be given:", combo.GUIRollBonusPointReward); break; case ComboBase.EComboRewardType.CRT_ValueMultiplication: combo.GUIMoneyReward = EditorGUILayout.IntField("Value to be multiplied with for money: ", combo.GUIMoneyReward); combo.GUIXpReward = EditorGUILayout.IntField("Value to be multiplied with for xp: ", combo.GUIXpReward); combo.GUIRollBonusPointReward = EditorGUILayout.IntField("Value to be multiplied with for Roll Bonus Points: ", combo.GUIRollBonusPointReward); break; default: EditorGUILayout.LabelField("WARNING: Reward type has not been set", "WARNING: Reward type has not been set"); EditorGUILayout.LabelField(" ", " "); EditorGUILayout.LabelField("WARNING: Reward type has not been set", "WARNING: Reward type has not been set"); break; } //base.OnInspectorGUI(); }