コード例 #1
0
ファイル: SpecManager.cs プロジェクト: Mtuers/DeadCityDeadMan
    public int GetValue(StatsSheet.EStats stat)
    {
        int value;

        value = 0;
        foreach (GameObject spec in equippedSpecs)
        {
            value += spec.GetComponent <StatsSheet>().GetValue(stat);
        }
        return(value);
    }
コード例 #2
0
    string GetDetailedStatValue(StatsSheet.EStats stat)
    {
        string detailedStatValue;
        int    value;
        int    v_spec1;
        int    v_spec2;

        value             = GameSystem.game.character.GetBattleSystem().statSheet.GetValue(stat);
        v_spec1           = GameSystem.game.character.GetSpecManager().equippedSpecs[0].GetComponent <Spec>().GetStatsSheet().GetValue(stat);
        v_spec2           = GameSystem.game.character.GetSpecManager().equippedSpecs[1].GetComponent <Spec>().GetStatsSheet().GetValue(stat);
        detailedStatValue = value + " (" + v_spec1 + " + " + v_spec2 + ")";
        return(detailedStatValue);
    }
コード例 #3
0
    public int GetDefaultStat(StatsSheet.EStats stat)
    {
        switch (stat)
        {
        case StatsSheet.EStats.STATS_ATTACK:
            return(battleSystem.statSheet.attack);

        case StatsSheet.EStats.STATS_DEFENSE:
            return(battleSystem.statSheet.defense);

        case StatsSheet.EStats.STATS_INITIATIVE:
            return(battleSystem.statSheet.initiative);

        case StatsSheet.EStats.STATS_HEALTH_MAX:
            return(battleSystem.statSheet.healthMax);

        default:
            return(-1);
        }
    }