コード例 #1
0
    public PokemonInstance(PokemonBase _source, int _level, Attack[] _attacks)
    {
        id     = UnityEngine.Random.Range(0, 999);
        level  = _level;
        source = _source;

        base_attack  = source.getAttack(level);
        base_speed   = source.getSpeed(level);
        base_defense = source.getDefense(level);
        base_hp      = source.getHealth(level);
        base_mana    = source.getMana(level);

        current_hp   = base_hp;
        current_mana = base_mana;

        attacks = _attacks;
    }
コード例 #2
0
    public PokemonInstance(PokemonBase _source, int _level, int _id, Attack[] _attacks)
    {
        id     = _id;
        level  = _level;
        source = _source;

        base_attack  = source.getAttack(level);
        base_speed   = source.getSpeed(level);
        base_defense = source.getDefense(level);
        base_hp      = source.getHealth(level);
        base_mana    = source.getMana(level);

        current_hp   = base_hp;
        current_mana = base_mana;

        attacks = _attacks;
    }