コード例 #1
0
    public void AllocateRewards()
    {
        foreach (HeroData hero in GameManager.Instance.inBattleHeroes)
        {
            hero.AddExperience(gainedExp);
        }

        PlayerStats playerStats = GameManager.Instance.PlayerStats;

        playerStats.ModifyExpStock((int)(gainedExp * PlayerStats.EXP_STOCK_RATE));
        playerStats.ModifyItemFragments(gainedFragments);

        foreach (Equipment equip in gainedEquipment)
        {
            playerStats.AddEquipmentToInventory(equip);
        }

        foreach (ArchetypeItem archetypeItem in gainedArchetypeItems)
        {
            playerStats.AddArchetypeToInventory(archetypeItem);
        }
    }