示例#1
0
    //戦闘結果をステータスに反映する
    void applyBattleStateToStatus()
    {
        SirokoStats status = FindObjectOfType <SirokoStats>();

        //TODO アイテムをMonobehaviour依存のないクラスにまとめる
        status.items = new List <string>();
        foreach (BattleItem item in items)
        {
            status.items.Add(item.item.itemName);
        }
        status.mp = player.mp;
        status.hp = player.hp;
        status.addTurnCount(turnCount);
        //reward回収
        foreach (BattleReward reward in rewards.rewards)
        {
            switch (reward.rewardType)
            {
            case BattleReward.RewardType.GOLD:
                status.gold += reward.amount;
                break;

            case BattleReward.RewardType.EQUIP:
                Debug.Log("装備落とすのは未実装");
                break;

            case BattleReward.RewardType.ITEM:
                Debug.Log("アイテム落とすのは未実装");
                break;
            }
        }
    }