XSGridEditor
1.0.0
XSGridEditor is a lightweight square grid map system for 2D/3D SRPG games, and comes with a simple and easy-to-use grid editing function. It can be used as a beginning for you to create SRPG games.
|
事件分发,给对象之间解耦用的 在一个Emitter里可以为多个事件注册事件回调,每一个事件还可以对应多个回调函数 建议1个Emitter对应同一类的事件类型,防止过于臃肿导致查询耗时 具体用例: More...
Public Member Functions | |
Emitter () | |
构造函数 More... | |
void | On (TYPE type, T callback, int priority=65536, object target=null) |
为事件注册回调 More... | |
void | Emit (TYPE type, params object[] parameters) |
触发事件回调 More... | |
void | Off (TYPE type) |
为事件取消回调 More... | |
void | Off (TYPE type, T callback) |
为事件取消回调 More... | |
void | Off (TYPE type, object target) |
为事件取消回调,如果是匿名函数,就只能用target去查了 More... | |
void | Off (object target) |
为事件取消回调 More... | |
Private Attributes | |
Dictionary< TYPE, EmitterItems< T > > | _emitList |
事件分发,给对象之间解耦用的 在一个Emitter里可以为多个事件注册事件回调,每一个事件还可以对应多个回调函数 建议1个Emitter对应同一类的事件类型,防止过于臃肿导致查询耗时 具体用例:
TYPE | 事件类型,通常是字符串 |
T | 回调函数类型 |
T | : | Delegate |
|
inline |
构造函数
|
inline |
触发事件回调
type | 事件类型,通常是字符串 |
parameters | 事件回调带的参数 |
void XSSLG.Emitter< TYPE, T >.Off | ( | object | target | ) |
为事件取消回调
target | 在哪个对象上注册 |
|
inline |
为事件取消回调
type | 事件类型,通常是字符串 |
|
inline |
为事件取消回调,如果是匿名函数,就只能用target去查了
type | 事件类型,通常是字符串 |
target | 在哪个对象上注册 |
|
inline |
为事件取消回调
type | 事件类型,通常是字符串 |
callback | 事件回调 |
|
inline |
为事件注册回调
type | 事件类型,通常是字符串 |
callback | 事件回调 |
priority | 优先级,同一事件中优先级从高到低依次调用 |
target |
|
private |