摘要:为手头游戏项目写编器,关联编器和游戏中的游戏对象的属性成了一个不小的问题,经过多经改写总算有一个相对好点的方案了,如果大家有更好的解决方案,请指点:不废话,上代码:原文地址:http://blog.csdn.net/wzq9706/article/details/7924881myProperty.h// 王智泉#ifndef __myProperty__H__#define __myProperty__H__#include #include // @注意: 以下的宏只能在CPP文件中使用/* 定义一个属性@param ownerClass: 宿主类@param propertyName:
阅读全文
摘要:头文件// 王智泉 2012/06/11#ifndef __myNotification__H__#define __myNotification__H__#include "CCPlatformMacros.h"#include #include #include // 回调class myNotification;class myCallbackBase{public: myCallbackBase(){} virtual bool operator()(const myNotification& notification) = 0;};templateclas
阅读全文
摘要:http://blog.csdn.net/wzq9706/article/details/7858711// 王智泉enum { ST_1 = 0x01 << 1; // 状态1 ST_2 = 0x01 << 2; // 状态2 ST_3 = 0x01 << 3; // 状态3 ST_4 = 0x01 << 4; // 状态4 ST_5 = 0x01 << 5; // 状态5};class StateTest{public: StateTest():_state(0){} ~StateTest(){} // 设置指定状态 // @pa
阅读全文