Merge remote-tracking branch 'origin/master'

This commit is contained in:
Estrela Allan p1923381
2020-05-03 15:39:22 +02:00

View File

@ -14,6 +14,7 @@ using namespace godot;
GestionJeu::GestionJeu() GestionJeu::GestionJeu()
{ {
//Instanciation des principales classes des gestion des elmts du jeu
gPlayer = GestionPlayer::_new(); gPlayer = GestionPlayer::_new();
gTerrain = GestionTerrain::_new(); gTerrain = GestionTerrain::_new();
@ -23,10 +24,19 @@ GestionJeu::GestionJeu()
GestionJeu::~GestionJeu() GestionJeu::~GestionJeu()
{ {
<<<<<<< HEAD
delete gTerrain;
delete gPlayer;
delete gMobs; delete gMobs;
delete gCollision;
=======
delete gMobs;
>>>>>>> origin/master
} }
/**
* <summary>Associe les m<>thodes GODOT aux m<>thodes de la classe</summary>
*/
void GestionJeu::_register_methods() void GestionJeu::_register_methods()
{ {
register_method((char*)"_init", &GestionJeu::_init); register_method((char*)"_init", &GestionJeu::_init);
@ -34,23 +44,33 @@ void GestionJeu::_register_methods()
register_method((char*)"_process", &GestionJeu::_process); register_method((char*)"_process", &GestionJeu::_process);
} }
/**
* <summary>Methode <20>x<EFBFBD>cut<75>e lors de l'initialison de la classe (par godot)</summary>
*/
void GestionJeu::_init() void GestionJeu::_init()
{ {
Godot::print("Initialisation..."); //Godot::print("Initialisation...");
create_scene(); create_scene();
Godot::print("Initialisation OK !"); //Godot::print("Initialisation OK !");
} }
/**
* <summary>Methode <20>x<EFBFBD>cut<75>e suivant l'initialison de la classe</summary>
*/
void GestionJeu::_ready() void GestionJeu::_ready()
{ {
Godot::print("Ready..."); //Godot::print("Ready...");
setup_scene(); setup_scene();
Godot::print("Ready OK !"); //Godot::print("Ready OK !");
} }
/**
* <summary>Methode <20>x<EFBFBD>cut<75>e en boucle par Godot</summary>
*/
void GestionJeu::_process() void GestionJeu::_process()
{ {
// Check des collisions
gCollision->CheckCollisonSol(); gCollision->CheckCollisonSol();
@ -61,6 +81,9 @@ void GestionJeu::_process()
} }
} }
/**
* <summary>M<>thdode appel<65> lors de l'initilisation</summary>
*/
void GestionJeu::create_scene() void GestionJeu::create_scene()
{ {
add_child(gPlayer); add_child(gPlayer);
@ -77,6 +100,9 @@ void GestionJeu::create_scene()
} }
/**
* <summary></summary>
*/
void GestionJeu::setup_scene() void GestionJeu::setup_scene()
{ {
gPlayer->setPosition(15.0f, 150.0f); gPlayer->setPosition(15.0f, 150.0f);