C# Class KActionRecords, KEngine

客户端版的行为记录仪, 类似服务器的records.js 本质是一个事件驱动管理器, 但是拥有传入计数参数功能 为了性能,5秒保存一次(或特殊情况)
Inheritance: KBehaviour
显示文件 Open project: mr-kelly/KEngine

Public Methods

Method Description
AddCount ( Enum type, int addCount ) : Coroutine
AddCount ( Enum type, string subType, int addCount ) : Coroutine

增加次数

AddListener ( Enum type, GenCoroutineDelegate emGentor ) : void
AddListener ( Enum type, WaitCallbackDelegate waitCallback ) : void
AddListener ( Enum type, string subType, GenCoroutineDelegate emGentor ) : void
AddListener ( Enum type, string subType, WaitCallbackDelegate waitCallback ) : void
Event ( Enum type, int extraArg = -1 ) : Coroutine
Event ( Enum type, string subType, int extraArg = -1 ) : Coroutine

触发事件,不记录

GetCount ( Enum type, string subType = null ) : int

获取指定行为的发生次数

GetDelegateCount ( Enum type, string subType = null ) : int

获取委托函数数量

Mark ( Enum type, string subType = null ) : Coroutine

标记1次

Reset ( ) : void
UnBind ( Enum type, string subType, GenCoroutineDelegate emGentor ) : void
UnBind ( Enum type, string subType, WaitCallbackDelegate waitCallback ) : void
WaitCallback ( Enum type, string subType, int count, WaitCallbackDelegate func ) : Coroutine

Private Methods

Method Description
CoTriggerEventFuncs ( Enum type, string subType, int count ) : IEnumerator
CoWaitCallback ( Enum type, string subType, int count, WaitCallbackDelegate func ) : IEnumerator
Init ( ) : void
MakeKey ( Enum type, string subType ) : string
Save ( ) : void
Update ( ) : void

Method Details

AddCount() public static method

public static AddCount ( Enum type, int addCount ) : Coroutine
type Enum
addCount int
return Coroutine

AddCount() public static method

增加次数
public static AddCount ( Enum type, string subType, int addCount ) : Coroutine
type Enum
subType string
addCount int
return Coroutine

AddListener() public static method

public static AddListener ( Enum type, GenCoroutineDelegate emGentor ) : void
type Enum
emGentor GenCoroutineDelegate
return void

AddListener() public static method

public static AddListener ( Enum type, WaitCallbackDelegate waitCallback ) : void
type Enum
waitCallback WaitCallbackDelegate
return void

AddListener() public static method

public static AddListener ( Enum type, string subType, GenCoroutineDelegate emGentor ) : void
type Enum
subType string
emGentor GenCoroutineDelegate
return void

AddListener() public static method

public static AddListener ( Enum type, string subType, WaitCallbackDelegate waitCallback ) : void
type Enum
subType string
waitCallback WaitCallbackDelegate
return void

Event() public static method

public static Event ( Enum type, int extraArg = -1 ) : Coroutine
type Enum
extraArg int
return Coroutine

Event() public static method

触发事件,不记录
public static Event ( Enum type, string subType, int extraArg = -1 ) : Coroutine
type Enum
subType string
extraArg int
return Coroutine

GetCount() public static method

获取指定行为的发生次数
public static GetCount ( Enum type, string subType = null ) : int
type Enum
subType string
return int

GetDelegateCount() public static method

获取委托函数数量
public static GetDelegateCount ( Enum type, string subType = null ) : int
type Enum
subType string
return int

Mark() public static method

标记1次
public static Mark ( Enum type, string subType = null ) : Coroutine
type Enum
subType string
return Coroutine

Reset() public static method

public static Reset ( ) : void
return void

UnBind() public static method

public static UnBind ( Enum type, string subType, GenCoroutineDelegate emGentor ) : void
type Enum
subType string
emGentor GenCoroutineDelegate
return void

UnBind() public static method

public static UnBind ( Enum type, string subType, WaitCallbackDelegate waitCallback ) : void
type Enum
subType string
waitCallback WaitCallbackDelegate
return void

WaitCallback() public static method

public static WaitCallback ( Enum type, string subType, int count, WaitCallbackDelegate func ) : Coroutine
type Enum
subType string
count int
func WaitCallbackDelegate
return Coroutine