Exemplo n.º 1
0
Perso::Perso(Perso &p):WGObject(p.parent()){
    _name = p.get_name();
    _HP = p.get_HP();
    _MP = p.get_MP();
    _strength = p.get_strength();
    _power = p.get_power();
    _def = p.get_def();
    _mr = p.get_MR();
    _luck = p.get_luck();
    _states = p.get_states();
    _xp = p.get_XP();
    set_moved(false);

    connect(this, SIGNAL(signal_perso_win_level(Perso*)), this, SLOT(slot_perso_win_level()));
}
Exemplo n.º 2
0
Perso::Perso(WGObject &obj):WGObject(&obj){
    _HP = 0.0;
    _MP = 0.0;
    _strength = 0.0;
    _power = 0.0;
    _def = 0.0;
    _mr = 0.0;
    _luck = 0.0;
    _lvl = 0;
    _mob = 0;
    _xp = 0;
    _states = std::vector<PState>();
    set_moved(false);

    connect(this, SIGNAL(signal_perso_win_level(Perso*)), this, SLOT(slot_perso_win_level()));
}
Exemplo n.º 3
0
Perso::Perso():WGObject(NULL),_shield(), _weapon(){
    _name = "";
    _HP = 0.0;
    _MP = 0.0;
    _xp = 0;
    _strength = 0.0;
    _power = 0.0;
    _def = 0.0;
    _mr = 0.0;
    _luck = 0.0;
    _lvl = 0;
    _mob = 0;
    _states = std::vector<PState>();
    set_moved(false);

    connect(this, SIGNAL(signal_perso_win_level(Perso*)), this, SLOT(slot_perso_win_level()));
}
Exemplo n.º 4
0
Perso::Perso(std::string name, int perso_id,
             double HP, double MP,
             double strength, double power,
             double def, double mr,
             double luck, int lvl, int mob,
             std::vector<PState> state,
             QObject* obj):WGObject(obj) {
    _name = name;
    _player_id = perso_id;
    _HP = HP;
    _MP = MP;
    _strength = strength;
    _power = power;
    _def = def;
    _mr = mr;
    _luck = luck;
    _lvl = lvl;
    _mob = mob;
    _states = state;
    _xp = 0;
    set_moved(false);

    connect(this, SIGNAL(signal_perso_win_level(Perso*)), this, SLOT(slot_perso_win_level()));
}
Exemplo n.º 5
0
void
Perso::slot_reset_has_moved(){
    set_moved(false);
}
Exemplo n.º 6
0
void
Perso::slot_set_has_moved(){
    set_moved(true);
}
Exemplo n.º 7
0
void player2d::move(const MOVE_DIRECTION& direction) {
    npc2d::move(direction);

    // player moved to the next tile
    set_moved(true);
}