private void ShowWeapons() { ShowEquippables(); GUILayout.Label("> Weapon", EditorStyles.boldLabel); BaseWeaponDamage = EditorGUILayout.IntField("Base Damage: ", Mathf.Clamp(BaseWeaponDamage, 0, 999)); WeaponEffect = (Enums.eStatusEffect)EditorGUILayout.EnumPopup("Effect: ", WeaponEffect); WeaponMultiTarget = EditorGUILayout.Toggle("Multiple Targets?: ", WeaponMultiTarget); Range = EditorGUILayout.FloatField("Range: ", Mathf.Clamp(Range, 0, 99)); WeaponItem weapon = (WeaponItem)mCurrentCreateType; //GUILayout.Label("Type", EditorStyles.boldLabel); //WeaponRangeType = (Enums.eWeaponType)EditorGUILayout.EnumPopup("Weapon Type: ", WeaponRangeType); switch (weapon.WeaponType) { case Enums.eWeaponType.Melee: MeleeTwoHanded = EditorGUILayout.Toggle("Two Handed?: ", MeleeTwoHanded); //if (mCurrentItem.GetType() != typeof(MeleeWeaponItem)) //{ // mCurrentItem = new MeleeWeaponItem(); //} break; case Enums.eWeaponType.Ranged: //if (mCurrentItem.GetType() != typeof(RangedWeaponItem)) //{ // mCurrentItem = new RangedWeaponItem(); //} break; case Enums.eWeaponType.Magic: GUILayout.Label(" > Magic", EditorStyles.boldLabel); MagicFocusType = (Enums.eMagicFocusType)EditorGUILayout.EnumPopup("Focus: ", MagicFocusType); MagicType = (Enums.eMagicType)EditorGUILayout.EnumPopup("Type: ", MagicType); MagicRadius = EditorGUILayout.FloatField("Radius: ", Mathf.Clamp(MagicRadius, 0, 99)); MagicEffect = (Enums.eStatusEffect)EditorGUILayout.EnumPopup("Effect: ", MagicEffect); MagicCost = EditorGUILayout.IntField("Cost: ", Mathf.Clamp(MagicCost, 0, 999)); Spell spell = (Spell)weapon; if (spell != null) { GUILayout.Label(" > Spell", EditorStyles.boldLabel); SpellType = (Enums.eSpellType)EditorGUILayout.EnumPopup("Type: ", SpellType); break; } //if (mCurrentItem.GetType() != typeof(MagicWeaponItem)) //{ // mCurrentItem = new MagicWeaponItem(); //} break; } }
private void ShowConsumables() { GUILayout.Label("> Consumable", EditorStyles.boldLabel); //newConsumableType = (Enums.eConsumableType)EditorGUILayout.EnumPopup("Consumable: ", newConsumableType); ConsumableItem consumable = (ConsumableItem)mCurrentCreateType; switch (consumable.ConsumableType) { case Enums.eConsumableType.Recovery: GUILayout.Label(" > Recovery", EditorStyles.boldLabel); RecoveryItem recovery = (RecoveryItem)consumable; //newRecoveryStatType = (Enums.eConsumableStatType)EditorGUILayout.EnumPopup("Stat Type: ", newRecoveryStatType); GUILayout.Label("Recovery Type: " + recovery.ConsumableStatType, EditorStyles.boldLabel); recoveryAmount = EditorGUILayout.IntField("Recovery Amount: ", Mathf.Clamp(recoveryAmount, 0, 99)); //if (mCurrentItem.GetType() != typeof(RecoveryItem)) //{ // mCurrentItem = new RecoveryItem(); //} break; case Enums.eConsumableType.StatUpgrade: GUILayout.Label(" > Stat Upgrade", EditorStyles.boldLabel); StatUpgradeItem statUpgrade = (StatUpgradeItem)consumable; newStatType = (Enums.eStatType)EditorGUILayout.EnumPopup("Boost Max Stat: ", newStatType); statBoostAmount = EditorGUILayout.IntField("Amount: ", Mathf.Clamp(statBoostAmount, 0, 99)); //if (mCurrentItem.GetType() != typeof(StatUpgradeItem)) //{ // mCurrentItem = new StatUpgradeItem(); //} break; case Enums.eConsumableType.StatusEffect: GUILayout.Label(" > Status Effect", EditorStyles.boldLabel); StatusEffectItem status = (StatusEffectItem)consumable; newEffectType = (Enums.eStatusEffect)EditorGUILayout.EnumPopup("Effect: ", newEffectType); //if (mCurrentItem.GetType() != typeof(StatusEffectItem)) //{ // mCurrentItem = new StatusEffectItem(); //} break; case Enums.eConsumableType.WeaponUpgrade: GUILayout.Label(" > Weapon Upgrade", EditorStyles.boldLabel); WeaponUpgradeItem weaponUpgrade = (WeaponUpgradeItem)consumable; GUILayout.Label("Stat Boosted: ATT", EditorStyles.boldLabel); weaponUpgradeAmount = EditorGUILayout.IntField("Amount: ", Mathf.Clamp(weaponUpgradeAmount, 0, 99)); //if (mCurrentItem.GetType() != typeof(WeaponUpgradeItem)) //{ // mCurrentItem = new WeaponUpgradeItem(); //} break; case Enums.eConsumableType.CharacterSupport: GUILayout.Label(" > Character Support", EditorStyles.boldLabel); CharacterSupportItem support = (CharacterSupportItem)consumable; switch (support.SupportType) { case Enums.eCharacterSupportType.Teleport: GUILayout.Label(" > Teleport", EditorStyles.boldLabel); Teleport t = (Teleport)support; TeleportPrefab = (GameObject)EditorGUILayout.ObjectField("Prefab:", TeleportPrefab, typeof(GameObject), false); if (TeleportPrefab != null) { TeleportPrefabName = TeleportPrefab.name; } break; case Enums.eCharacterSupportType.Revive: GUILayout.Label(" > Revive", EditorStyles.boldLabel); // no fields break; case Enums.eCharacterSupportType.Resource: GUILayout.Label(" > Resource", EditorStyles.boldLabel); // will need fields filled in break; case Enums.eCharacterSupportType.Scroll: GUILayout.Label(" > Scroll", EditorStyles.boldLabel); ScrollTeachType = (Enums.eSpellType)EditorGUILayout.EnumPopup("Spell Type: ", ScrollTeachType); break; } break; } }