由于是个人练习用的,而且时间仓促,没有想好后再来写,尽请见谅!
//UtilTool.h
#pragma once
#include <iostream>
#include <string>
#include <list>
using namespace std;
//Event.h
#pragma once
#include "UtilTool.h"
enum EVENT_STATE
{
EAWAKE = 0,
ESTART = 1,
ETICK = 2,
EEND = 3,
ELEAVE = 4,
EDESTROY = 5,
ENORMAL = 6,
ECLICK =7,
EOVERLAP =8
};
class Event
{
public:
Event() :mCurrentState(EVENT_STATE::EAWAKE) {}
virtual void Awake() { cout << "This is basic awake!"<<endl; };
virtual void Start() { cout << "This is basic start!"<<endl; };
virtual void Tick() { cout << "This is basic tick!"<<endl; };
virtual void End() { cout << "This is basic end!"<<endl; };
virtual void Overlap() { cout << "This is basic overlap!"<<endl; };
virtual void Destroy() { cout << "This is basic destroy!"<<endl; };
EVENT_STATE mCurrentState;
};
//Object.h
#pragma once
#include "UtilTool.h"
#include "Eve