示例#1
0
    public void init()
    {
        childDataInstances = new List <ListItem>();
        foreach (string s in masterData)
        {
            string description = "";
            switch (listType)
            {
            case ListType.ACTION:
                description = ActionStore.getActionByName(s).descriptionText;
                break;

            case ListType.ATTENDANT:
                description = "同行者さん!完全未定なので固定メッセージです";
                break;

            case ListType.ENEMY:
                description = EnemyStore.getEnemyDescriptionByName(s);
                break;

            case ListType.EQUIP:
                description = EquipStore.getEquipByName(s).description;
                break;

            case ListType.ITEM:
                description = "アイテムでーす";
                break;
            }
            addMaster(s, description);
        }
    }
示例#2
0
    public int getIntelligenceLevelByEquip()
    {
        int total = 0;

        foreach (string s in equipments)
        {
            Equip e = EquipStore.getEquipByName(s);
            total += e.intelligence;
        }
        return(total);
    }
示例#3
0
    public int getStrengthLevelByEquip()
    {
        int total = 0;

        foreach (string s in equipments)
        {
            Equip e = EquipStore.getEquipByName(s);
            total += e.strength;
        }
        return(total);
    }
示例#4
0
    public int getVitalityLevelByEquip()
    {
        int total = 0;

        foreach (string s in equipments)
        {
            Equip e = EquipStore.getEquipByName(s);
            total += e.vitality;
        }
        return(total);
    }
示例#5
0
    public void OnPointerEnter(PointerEventData eventData)
    {
        string equipName = text.text;

        if (text.text == "-" || text.text == null)
        {
            messageArea.updateText("-");
            return;
        }
        Equip e = EquipStore.getEquipByName(equipName);

        messageArea.updateText(e.description);
    }
示例#6
0
 void setEquips()
 {
     //装備とは、戦闘開始前に処理を行い「パラメータの上昇」「バフの付与」を行うアイテムである とすれば処理しやすそう
     foreach (string s in status.equipments)
     {
         Equip e = EquipStore.getEquipByName(s);
         battleModel.player.strength     += e.strength;
         battleModel.player.intelligence += e.intelligence;
         battleModel.player.speed        += e.speed;
         battleModel.player.vitality     += e.vitality;
         battleModel.player.defence      += e.defence;
         foreach (Buff.BuffID buffID in e.enchants)
         {
             battleModel.enchantBuff(buffID, ref battleModel.player);
         }
     }
 }
示例#7
0
    public override void setParameters(string itemName, int cost, StoreAreaComponent.ItemKind kind)
    {
        setText(itemName);
        setCost(cost);
        setKind(kind);

        switch (kind)
        {
        case StoreAreaComponent.ItemKind.EQUIP:
            Equip e = EquipStore.getEquipByName(itemName);
            setCost(Equip.getCostByRarity(e.rarity));
            break;

        case StoreAreaComponent.ItemKind.ITEM:
            Item i = ItemStore.getItemByName(itemName);
            setCost(Item.getCostByRarity(i.rarity));
            break;
        }
    }