mirror of
https://forge.univ-lyon1.fr/tplifap4/dungeonanddeamon.git
synced 2024-02-27 13:31:50 +01:00
Debut mouvement Mob
This commit is contained in:
@ -52,6 +52,13 @@ void GestionJeu::_ready()
|
||||
void GestionJeu::_process()
|
||||
{
|
||||
gCollision->CheckCollisonSol();
|
||||
|
||||
|
||||
Vector2 posPlayer = gPlayer->get_position();
|
||||
for (MobsCorpACorpIA* m : gMobs->mobs)
|
||||
{
|
||||
m->UpdateTargetPosition(posPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
void GestionJeu::create_scene()
|
||||
@ -60,11 +67,12 @@ void GestionJeu::create_scene()
|
||||
add_child(gTerrain);
|
||||
gMobs->AjoutMobC2C(10, 20, 5, 0, 1, 25);
|
||||
|
||||
for (KinematicBody2D* m : gMobs->mobs)
|
||||
for (MobsCorpACorpIA* m : gMobs->mobs)
|
||||
{
|
||||
auto mob = (MobsCorpACorpIA*) m;
|
||||
Godot::print("Add child mob");
|
||||
add_child(m);
|
||||
m->setPosition(15, 150);
|
||||
}
|
||||
|
||||
}
|
||||
@ -72,6 +80,7 @@ void GestionJeu::create_scene()
|
||||
void GestionJeu::setup_scene()
|
||||
{
|
||||
gPlayer->setPosition(15, 150);
|
||||
|
||||
gTerrain->GenerationCarte();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user