示例#1
0
void World::initialiseStatesAndStats()
{
    // Initialise sheep states
    mSheepStates.push_back(std::unique_ptr<LookOutForDog>(new LookOutForDog));
    mSheepStates.push_back(std::unique_ptr<EvadeDog>(new EvadeDog));
    mSheepStates.push_back(std::unique_ptr<Relax>(new Relax));
    mSheepStates.push_back(std::unique_ptr<Exit>(new Exit));

    mEntityStats.push_back(EntityStats("data/entityStats/sheepStats.dat"));
    mEntityStats.push_back(EntityStats("data/entityStats/dogStats.dat"));
}
示例#2
0
 EntityStats EntityStats::operator-(int val)const
 {
     return EntityStats(pv,
                        pi,
                        fat,
                        frc - val,
                        intel - val,
                        def - val,
                        mdef - val,
                        esq - val,
                        dex - val,
                        vatq - val,
                        chc - val,
                        chrm - val,
                        mvt
                        );
 }
示例#3
0
 EntityStats EntityStats::operator-(const EntityStats& other)const
 {
     return EntityStats(pv - other.pv,
                        pi - other.pi,
                        fat - other.fat,
                        frc - other.frc,
                        intel - other.intel,
                        def - other.def,
                        mdef - other.mdef,
                        esq - other.esq,
                        dex - other.dex,
                        vatq - other.vatq,
                        chc - other.chc,
                        chrm - other.chrm,
                        mvt - other.mvt
                        );
 }
示例#4
0
 EntityStats EntityStats::operator+(int val)const
 {
     return EntityStats(pv,
                        pi,
                        fat,
                        frc + val,
                        intel + val,
                        def + val,
                        mdef + val,
                        esq + val,
                        dex + val,
                        vatq + val,
                        chc + val,
                        chrm + val,
                        mvt
                        );
 }
示例#5
0
 EntityStats EntityStats::operator+(const EntityStats& other)const
 {
     return EntityStats(pv + other.pv,
                        pi + other.pi,
                        fat + other.fat,
                        frc + other.frc,
                        intel + other.intel,
                        def + other.def,
                        mdef + other.mdef,
                        esq + other.esq,
                        dex + other.dex,
                        vatq + other.vatq,
                        chc + other.chc,
                        chrm + other.chrm,
                        mvt + other.mvt
                        );
 }