Game::Game() { config.loadConfig(); loadRessources(); firstTimeHolding = true; initRandomBag(); shuffleRandomBag(); }
Game::Game(sf::RenderWindow *r) { config.loadConfig(); loadRessources(); firstTimeHolding = true; initRandomBag(); shuffleRandomBag(); renderArea = r; }
EnemyView::EnemyView(Int2 pos, TypeEnemy t, bool AI) :Enemy(pos,t,AI) { /* REBEL */ if(type == REBEL) { loadRessources(REBEL); initSounds(); setTexture(textures[REBEL]); addAnimations(animations_list[REBEL]); changeAnimation(REBEL_WATCH); updateIntRect(); } /* BOWSER */ else if(type == BOWSER) { loadRessources(BOWSER); initSounds(); setTexture(textures[BOWSER]); addAnimations(animations_list[BOWSER]); changeAnimation(BOWSER_STAND); updateIntRect(); } /* FLYING */ else if(type == FLYING) { loadRessources(FLYING); initSounds(); setTexture(textures[FLYING]); addAnimations(animations_list[FLYING]); changeAnimation(FLYING_FLY); updateIntRect(); } body.setSize(Vector2f(size.x,size.y)); }
AmmoView::AmmoView() :Ammo(),MyDrawable() { Int2 tmp_siz; if(type==BULLET || type==HEAVY_BULLET || type==LIGHT_BULLET) tmp_siz = Int2(50,12); if(type==FLAME) tmp_siz = Int2(300,150); if(type==GRENADE) tmp_siz = Int2(25,45); body.setOrigin(size.x/2,size.y/2); body.setSize(Vector2f(tmp_siz.x,tmp_siz.y)); initRotation(); loadRessources(); initRessources(); updateIntRect(); }
RessourceManager::RessourceManager() { _ressourceFilePath = "data/config/ressources.puce"; loadRessources(); }