Exemple #1
0
    private void ShowEquippables()
    {
        GUILayout.Label("> Equippable", EditorStyles.boldLabel);
        MinEquipType    = (Enums.eMinEquipRequirementType)EditorGUILayout.EnumPopup("Minimum Requirement: ", MinEquipType);
        MinLevelToEquip = EditorGUILayout.IntField("Minimum Level: ", Mathf.Clamp(MinLevelToEquip, 0, 99));
        MinStatType     = (Enums.eStatType)EditorGUILayout.EnumPopup("Limiting Stat: ", MinStatType);
        MinStatLevel    = EditorGUILayout.IntField("Min Stat Level: ", Mathf.Clamp(MinStatLevel, 0, 999));

        for (int i = 0; i < UsableClasses.Count; i++)
        {
            UsableClasses[i] = (Enums.eClassType)EditorGUILayout.EnumPopup("Usable By (Class): ", UsableClasses[i]);
        }

        if (GUILayout.Button("Add Usable Class"))
        {
            UsableClasses.Add(Enums.eClassType.Melee);
        }

        for (int i = 0; i < UsableRaces.Count; i++)
        {
            UsableRaces[i] = (Enums.eRaceType)EditorGUILayout.EnumPopup("Usable By (Race): ", UsableRaces[i]);
        }

        if (GUILayout.Button("Add Usable Race"))
        {
            UsableRaces.Add(Enums.eRaceType.Human);
        }
    }
Exemple #2
0
    private void Reset()
    {
        mCurrentItem = new InventoryItem();

        newItemName   = "New Item";
        newItemIcon   = null;
        newItemDesc   = "New Description";
        newItemType   = Enums.eItemType.Consumable;
        newItemValue  = 0;
        newItemRarity = Enums.eRarity.Common;
        Themes        = new List <Enums.eLevelTheme>((int)Enums.eLevelTheme.All);
        Difficulties  = new List <Enums.eDifficulty>((int)Enums.eDifficulty.All);

        // consumable
        newConsumableType   = Enums.eConsumableType.Recovery;
        newRecoveryStatType = Enums.eConsumableStatType.HP;
        recoveryAmount      = 0;
        newStatType         = Enums.eStatType.HP;
        statBoostAmount     = 0;
        newEffectType       = Enums.eStatusEffect.All;
        weaponUpgradeAmount = 0;

        // stat boosts
        newBoostType   = Enums.eStatBoostType.Basic;
        StatToBoost    = Enums.eStatType.HP;
        BoostAmount    = 0;
        LongTermEffect = Enums.eLongTermEffectType.HP;
        LongTermDelay  = 0f;
        LongTermAmount = 0;
        ResistEffect   = Enums.eStatusEffect.All;
        ResistPercent  = 0f;

        // equippables
        MinEquipType    = Enums.eMinEquipRequirementType.None;
        MinLevelToEquip = 0;
        MinStatType     = Enums.eStatType.HP;
        MinStatLevel    = 0;
        UsableClasses   = new List <Enums.eClassType>((int)Enums.eClassType.All);
        UsableRaces     = new List <Enums.eRaceType>((int)Enums.eRaceType.All);

        // armours
        newArmourType = Enums.eArmourLocation.Head;
        BodySlots     = 0;

        // weapons
        BaseWeaponDamage  = 0;
        WeaponEffect      = Enums.eStatusEffect.None;
        WeaponMultiTarget = false;
        WeaponRangeType   = Enums.eWeaponType.Melee;
        MeleeTwoHanded    = false;
        Range             = 0f;
        MagicFocusType    = Enums.eMagicFocusType.Self;
        MagicType         = Enums.eMagicType.Support;
        MagicRadius       = 1f;
        MagicEffect       = Enums.eStatusEffect.None;
        MagicCost         = 0;
    }