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); } }
public int getIntelligenceLevelByEquip() { int total = 0; foreach (string s in equipments) { Equip e = EquipStore.getEquipByName(s); total += e.intelligence; } return(total); }
public int getStrengthLevelByEquip() { int total = 0; foreach (string s in equipments) { Equip e = EquipStore.getEquipByName(s); total += e.strength; } return(total); }
public int getVitalityLevelByEquip() { int total = 0; foreach (string s in equipments) { Equip e = EquipStore.getEquipByName(s); total += e.vitality; } return(total); }
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); }
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); } } }
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; } }