From 97f45944dbe1730635a7840b4fb83541cadfbfe0 Mon Sep 17 00:00:00 2001 From: Estrela Allan p1923381 Date: Thu, 30 Apr 2020 16:19:46 +0200 Subject: [PATCH] public bool mobs --- .../DungeonAndDemaonScript/MobsCorpACorpIA.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/DungeonAndDeamonScript/DungeonAndDemaonScript/MobsCorpACorpIA.h b/DungeonAndDeamonScript/DungeonAndDemaonScript/MobsCorpACorpIA.h index 7b97e73..448a339 100644 --- a/DungeonAndDeamonScript/DungeonAndDemaonScript/MobsCorpACorpIA.h +++ b/DungeonAndDeamonScript/DungeonAndDemaonScript/MobsCorpACorpIA.h @@ -1,5 +1,6 @@ #pragma once #include "MobsCorpACorp.h" +#include "GestionPlayer.h" #include "MobsIA.h" #include #include @@ -25,6 +26,7 @@ private: public: MobsCorpACorp m; + GestionPlayer* gPlayer; public: MobsCorpACorpIA(); @@ -34,10 +36,20 @@ public: void _init(); void _ready(); +private: + void droit(); + void gauche(); + void bas(); + void saut(); + void idle(); + void attack(); + void createMobsCorpACorp(); void setupMobsCorpACorp(); - void mouvement(); + void mouvement(float dt); void setPosition(int x, int y); + +public: bool on_ground = false; bool on_roof = false; bool on_left_wall = false; @@ -46,7 +58,10 @@ public: public: void Action(); - const int gravity = 90; + const float GamePlayMultiplicator = 100.0f; + const float gravity = 9.8f * GamePlayMultiplicator; + const float speed = 100.f; + const float power_jump = -5.0f * GamePlayMultiplicator; };