mirror of
https://forge.univ-lyon1.fr/tplifap4/dungeonanddeamon.git
synced 2024-02-27 13:31:50 +01:00
Conversion MobsIA en KinematicBody2D
This commit is contained in:
parent
bf1e311adb
commit
90426616d7
@ -59,8 +59,9 @@ void GestionJeu::create_scene()
|
||||
add_child(gPlayer);
|
||||
add_child(gTerrain);
|
||||
gMobs->AjoutMobC2C(10, 20, 5, 0, 1, 25);
|
||||
for (MobsIA* m : gMobs->mobs)
|
||||
for (KinematicBody2D* m : gMobs->mobs)
|
||||
{
|
||||
auto mob = (MobsCorpACorpIA*) m;
|
||||
Godot::print("Add child mob");
|
||||
add_child(m);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
void GestionMobs::AjoutMobC2C(int pvMax, int speed, int degat, int cooldown, int rangeDegat, int rangeAgro)
|
||||
{
|
||||
MobsCorpACorpIA* fireElement = (MobsCorpACorpIA*) MobsCorpACorpIA::_new();
|
||||
MobsCorpACorpIA* fireElement = MobsCorpACorpIA::_new();
|
||||
mobs.push_back(fireElement);
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
class GestionMobs
|
||||
{
|
||||
public :
|
||||
std::vector<MobsIA*> mobs;
|
||||
std::vector<KinematicBody2D*> mobs;
|
||||
|
||||
public:
|
||||
void AjoutMobC2C(int pvMax, int speed, int degat, int cooldown, int rangeDegat, int rangeAgro);
|
||||
|
Loading…
Reference in New Issue
Block a user