mirror of
https://forge.univ-lyon1.fr/tplifap4/dungeonanddeamon.git
synced 2024-02-27 13:31:50 +01:00
MobsIa MobsCorsACorps modifier + sprite ennemie
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
void GestionMobs::AjoutMobC2C(int pvMax, int speed, int degat, int cooldown, int rangeDegat, int rangeAgro)
|
||||
{
|
||||
Mobs.add(ElementFire);
|
||||
}
|
||||
|
||||
void GestionMobs::AjoutMobDistance(int pvMax, int speed, int degat, int cooldown, int rangeAgro)
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
#include "MobsAgressif.h"
|
||||
#include <Godot.hpp>
|
||||
#include <KinematicBody2D.hpp>
|
||||
class MobsCorpACorp :
|
||||
public MobsAgressif
|
||||
{
|
||||
|
@ -1,13 +1,35 @@
|
||||
#pragma once
|
||||
#include "MobsCorpACorp.h"
|
||||
#include "MobsIA.h"
|
||||
class MobsCorpACorpIA :
|
||||
public MobsIA
|
||||
#include <CircleShape2D.hpp>
|
||||
#include <CollisionShape2D.hpp>
|
||||
#include <Sprite.hpp>
|
||||
#include "MobsCorpACorp.h"
|
||||
|
||||
using namespace godot;
|
||||
|
||||
class MobsCorpACorpIA : public MobsIA
|
||||
{
|
||||
|
||||
|
||||
|
||||
public:
|
||||
MobsCorpACorp m;
|
||||
public:
|
||||
MobsCorpACorpIA();
|
||||
|
||||
void static _register_methods();
|
||||
void _process(float delta) override;
|
||||
void _init() override;
|
||||
void _ready() override;
|
||||
|
||||
void createMobsCorpACorp();
|
||||
void setupMobsCorpACorp();
|
||||
|
||||
public:
|
||||
void Action();
|
||||
};
|
||||
|
||||
private:
|
||||
Vector2 velocity;
|
||||
Vector2 FLOOR;
|
||||
};
|
||||
|
@ -1,5 +1,41 @@
|
||||
#pragma once
|
||||
class MobsIA
|
||||
#include "MobsCorpACorp.h"
|
||||
#include "MobsIA.h"
|
||||
#include <CircleShape2D.hpp>
|
||||
#include <CollisionShape2D.hpp>
|
||||
#include <Sprite.hpp>
|
||||
#include "MobsCorpACorp.h"
|
||||
#include <Godot.hpp>
|
||||
#include <KinematicBody2D.hpp>
|
||||
|
||||
using namespace godot;
|
||||
|
||||
class MobsIA : public KinematicBody2D
|
||||
{
|
||||
public:
|
||||
Sprite* sprite_MobsCorpACorp_ptr;
|
||||
CollisionShape2D* collision_MobsCorpACorp_ptr;
|
||||
|
||||
Ref<Resource> texture_MobsCorpACorp_ptr;
|
||||
Ref<CircleShape2D> shape_MobsCorpACorp_ptr;
|
||||
|
||||
private:
|
||||
GODOT_CLASS(MobsIA, KinematicBody2D)
|
||||
|
||||
|
||||
public:
|
||||
MobsIA();
|
||||
|
||||
void static _register_methods();
|
||||
virtual void _process(float delta);
|
||||
virtual void _init();
|
||||
virtual void _ready();
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
Vector2 velocity;
|
||||
Vector2 FLOOR;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user