gMobs devient un ptr, et AjoutMobsC2C est appellé dans l'init

This commit is contained in:
Amaury 2020-04-14 08:40:58 +02:00
parent 74fbc1ed6c
commit 4f9c15a206
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,8 @@ GestionJeu::GestionJeu()
{
gPlayer = GestionPlayer::_new();
gTerrain = GestionTerrain::_new();
gMobs = new GestionMobs();
}
GestionJeu::~GestionJeu()
@ -53,6 +55,8 @@ void GestionJeu::create_scene()
{
add_child(gPlayer);
add_child(gTerrain);
gMobs->AjoutMobC2C(10, 20, 5, 0, 1, 25);
}
void GestionJeu::setup_scene()

View File

@ -20,7 +20,7 @@ private:
public:
//Gestion des deifferents parties du jeu
GestionPlayer* gPlayer;
GestionMobs gMobs;
GestionMobs* gMobs;
GestionTerrain* gTerrain;
GestionCollision gCollision;
GestionItem gItem;