Ejemplo n.º 1
0
    public void UseItem()
    {
        List <ItemPropertyAmount> properties = new List <ItemPropertyAmount>();

        properties = itemDefinition.ItemProperties;
        int count = properties.Count;

        if (count > 0)
        {
            for (int i = 0; i < count; i++)
            {
                ItemPropertyType type  = properties[i].PropertyType;
                float            value = properties[i].Amount;
                switch (type)
                {
                case ItemPropertyType.Energy:
                    characterStatusController.IncreaseCurrentEnergy(value);
                    break;

                case ItemPropertyType.Motivation:
                    characterStatusController.IncreaseCurrentMotivation(value);
                    break;

                case ItemPropertyType.StatusPoint:
                    characterStatusController.IncreaseStatusPoints((int)value);
                    break;

                case ItemPropertyType.SoftSkillPoint:
                    characterStatusController.IncreaseSoftSkillPoints((int)value);
                    break;

                case ItemPropertyType.CharacterExp:
                    characterStatusController.IncreaseEXP((int)value);
                    break;

                case ItemPropertyType.HSMathExp:
                    hardSkillsController.IncreaseEXP(hardSkillsController.INST_Math_Id, (int)value);
                    break;

                case ItemPropertyType.HSProgramingExp:
                    hardSkillsController.IncreaseEXP(hardSkillsController.INST_Programming_Id, (int)value);
                    break;

                case ItemPropertyType.HSEngineExp:
                    hardSkillsController.IncreaseEXP(hardSkillsController.INST_Engine_Id, (int)value);
                    break;

                case ItemPropertyType.HSNetworkExp:
                    hardSkillsController.IncreaseEXP(hardSkillsController.INST_Network_Id, (int)value);
                    break;

                case ItemPropertyType.HSAiExp:
                    hardSkillsController.IncreaseEXP(hardSkillsController.INST_Ai_Id, (int)value);
                    break;

                case ItemPropertyType.HSDesignExp:
                    hardSkillsController.IncreaseEXP(hardSkillsController.INST_Design_Id, (int)value);
                    break;

                case ItemPropertyType.HSTesting:
                    hardSkillsController.IncreaseEXP(hardSkillsController.INST_Testing_Id, (int)value);
                    break;

                case ItemPropertyType.HSArtExp:
                    hardSkillsController.IncreaseEXP(hardSkillsController.INST_Art_Id, (int)value);
                    break;

                case ItemPropertyType.HSSoundExp:
                    hardSkillsController.IncreaseEXP(hardSkillsController.INST_Sound_Id, (int)value);
                    break;
                }
            }
        }
        DestroyItemPickUp();
    }