81 lines
1.8 KiB
C++
81 lines
1.8 KiB
C++
/* ************************************************************************** */
|
|
/* _____ _ __ ___ __ */
|
|
/* Script.hpp | ___(_)/ _| ___ ( _ ) / /_ */
|
|
/* Project: C-Engine | |_ | | |_ / _ \/ _ \| '_ \ */
|
|
/* | _| | | _| __/ (_) | (_) | */
|
|
/* Author: Fife <wasabifife@gmail.com> |_| |_|_| \___|\___/ \___/ */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef CENGINE_SCRIPT_HPP
|
|
#define CENGINE_SCRIPT_HPP
|
|
|
|
#include "..\C-Engine\CEngine.hpp"
|
|
|
|
class Script
|
|
{
|
|
public:
|
|
|
|
Script(); //Constructeur
|
|
|
|
virtual void Update();
|
|
virtual void UpdateEverySecond();
|
|
virtual void Start();
|
|
virtual void Teleport( int x , int y , int level );
|
|
|
|
void AffectObject(Object * OV);
|
|
void AffectEngine(Engine * EV);
|
|
|
|
Engine * GetEngine();
|
|
Object * GetObject();
|
|
|
|
//Render
|
|
|
|
void SetIt( int v );
|
|
int GetIt();
|
|
|
|
void ReverseRender( bool v );
|
|
bool GetReverse();
|
|
|
|
//Rigidbody
|
|
|
|
Body * GetBody();
|
|
|
|
void Move( int x , int y );
|
|
bool CollisionDecor( int x , int y );
|
|
|
|
//Transforms
|
|
|
|
int GetX();
|
|
int GetY();
|
|
|
|
void SetX( int x );
|
|
void SetY( int y);
|
|
void SetXY( int x , int y );
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Object * OConteneur;
|
|
Engine * EConteneur;
|
|
|
|
};
|
|
|
|
class Trigger_Script: public Script
|
|
{
|
|
public:
|
|
|
|
void Update();
|
|
|
|
void AffectTrigger(Trigger * TV);
|
|
Trigger * GetTrigger();
|
|
|
|
private:
|
|
|
|
Trigger * TConteneur;
|
|
};
|
|
|
|
|
|
#endif
|