/* ************************************************************************** */ /* _____ _ __ ___ __ */ /* Object.hpp | ___(_)/ _| ___ ( _ ) / /_ */ /* Project: C-Engine | |_ | | |_ / _ \/ _ \| '_ \ */ /* | _| | | _| __/ (_) | (_) | */ /* Author: Fife |_| |_|_| \___|\___/ \___/ */ /* */ /* ************************************************************************** */ #ifndef CENGINE_OBJECT_HPP #define CENGINE_OBJECT_HPP #include "..\C-Engine\CEngine.hpp" class Object { public: Object(); //Constructeur ~Object(); void AffectEngine(Engine * EV); void AffectScript(Script * SV); void AffectTag(char * v); void Enable(); void Disable(); void AddRigidBody(); //Ajout un RigidBody //Accesseur Engine * GetEngine(); Transform * GetTransform(); RigidBody * GetRigidBody(); Render * GetRender(); Script * GetScript(); char * GetTag(); bool GetEnable(); //Fonction pour les scripts Object * GetObjectCollisionTag( char* v , int x = 0 , int y = 0); bool GetCollisionTag( char * v , int x = 0 , int y = 0 ); bool IsOnScreen(); bool Collision(int id , Level * l = NULL); bool TestTag(char * v); protected: Transform * OTransform; Render * ORender; RigidBody * ORigidBody; Script * OScript; Engine * Conteneur; char * tag; bool enable; }; class Trigger: public Object { public: Trigger(); //Constructeur ~Trigger(); void CreateTrigger(int x , int y , int width , int height ); void SetDestination(int x , int y , int level , char * onlypass = NULL); Vec2 GetDestination(); int GetDestinationLevel(); char * GetPass(); private: Vec2 destination; int leveldestination; char * pass; }; #endif