示例#1
0
    public void ReCalcStats()
    {
        StatPack powerupStats = new StatPack();

        foreach (PowerupAttachable attachment in equippedWeapons.Values)
        {
            PowerupStats newStats = attachment.GetComponent <PowerupStats>();
            if (newStats != null)
            {
                powerupStats += newStats.GetPack();
            }
        }
        foreach (PowerupAttachable attachment in equippedMods.Values)
        {
            PowerupStats newStats = attachment.GetComponent <PowerupStats>();
            if (newStats != null)
            {
                powerupStats += newStats.GetPack();
            }
        }
        controller.GetPlayer().ReApplyStats(powerupStats);
    }