Documentation
¶
Overview ¶
FIXME 非线程安全
Index ¶
- Constants
- func CallFighPost(fightid FightId, msg string, args []interface{}) ([]interface{}, error)
- func CallFightAward(fightid FightId, msg string, args []interface{}) ([]interface{}, error)
- func CallFightDamageCalc(fightid FightId, msg string, args []interface{}) ([]interface{}, error)
- func CallFightScheduler(fightid FightId, msg string, args []interface{}) ([]interface{}, error)
- func CastFighPost(fightid FightId, msg string, args []interface{})
- func CastFightAward(fightid FightId, msg string, args []interface{})
- func CastFightDamageCalc(fightid FightId, msg string, args []interface{})
- func CastFightScheduler(fightid FightId, msg string, args []interface{})
- func CreateFight(fightid FightId, flag int, fmap IFightMap) error
- func DestroyFight(fightid FightId) error
- func GetHandler(msg string) handler
- func NewAwardAlias(fightid FightId) string
- func NewDamageCalcAlias(fightid FightId) string
- func NewDefaultSpace() *Space
- func NewFightSchedulerAlias(fightid FightId) string
- func NewPostAlias(fightid FightId) string
- func ParseSchedulerInner(inner []interface{}) (IFightMap, int, FightId, *Space, map[*Entity]struct{}, map[*Entity]struct{}, ...)
- func RegisterHandler(msg string, hand handler)
- func UnRegisterHandler(msg string)
- type FightId
- type FightTimer
- type IFightMap
Constants ¶
View Source
const ( TIMER_SCHEDULER = "timer_scheduler" // scheduler帧函数 TIMER_AWARD = "timer_award" // award帧函数 TIMER_DAMAGE = "timer_damage" // damage帧函数 TIMER_POST = "timer_post" // post帧函数 INIT_SCHEDULER = "init_scheduler" // scheduler初始化函数 INIT_AWARD = "init_award" // award初始化函数 INIT_DAMAGE = "init_damage" // damage初始化函数 INIT_POST = "init_post" // post初始化函数 CLOSE_SCHEDULER = "close_scheduler" // scheduler清理函数 CLOSE_AWARD = "close_award" // award清理函数 CLOSE_DAMAGE = "close_damage" // damage清理函数 CLOSE_POST = "close_post" // post清理函数 )
内置开放函数标识
Variables ¶
This section is empty.
Functions ¶
func CallFighPost ¶
同步调用 default timeout 1s @params fightid:战斗id msg:消息类型 args:自定义参数
func CallFightAward ¶
同步调用 default timeout 1s @params fightid:战斗id msg:消息类型 args:自定义参数
func CallFightDamageCalc ¶
同步调用 default timeout 1s @params fightid:战斗id msg:消息类型 args:自定义参数
func CallFightScheduler ¶
同步调用 default timeout 1s @params fightid:战斗id msg:消息类型 args:自定义参数
func CastFighPost ¶
异步调用 @params fightid:战斗id msg:消息类型 args:自定义参数
func CastFightAward ¶
异步调用 @params fightid:战斗id msg:消息类型 args:自定义参数
func CastFightDamageCalc ¶
异步调用 @params fightid:战斗id msg:消息类型 args:自定义参数
func CastFightScheduler ¶
异步调用 @params fightid:战斗id msg:消息类型 args:自定义参数
func CreateFight ¶
创建一场战斗 @params fightid:战斗id flag:战斗标识(3v3 or 5v5) fmap:自定义的地图数据
func GetHandler ¶
func GetHandler(msg string) handler
func NewDamageCalcAlias ¶
新建一个战斗伤害计算进程别名 @params fightid:战斗id
func NewFightSchedulerAlias ¶
新建一个战斗调度器进程别名 @params fightid:战斗id
func ParseSchedulerInner ¶
func ParseSchedulerInner(inner []interface{}) (IFightMap, int, FightId, *Space, map[*Entity]struct{}, map[*Entity]struct{}, map[*Entity]struct{}, *FightTimer)
解析
func RegisterHandler ¶
func RegisterHandler(msg string, hand handler)
func UnRegisterHandler ¶
func UnRegisterHandler(msg string)
Types ¶
type FightTimer ¶
type FightTimer struct {
// contains filtered or unexported fields
}
func (*FightTimer) AddOneJob ¶
func (f *FightTimer) AddOneJob(entity *Entity, jobInterval time.Duration, jobFunc MessageHandler1, args []interface{})
func (*FightTimer) AddRepeatJob ¶
func (f *FightTimer) AddRepeatJob(entityId EntityId, jobInterval time.Duration, times uint64, jobFunc MessageHandler1, args []interface{})
func (*FightTimer) DelAiJob ¶
func (f *FightTimer) DelAiJob(entityId EntityId)
Click to show internal directories.
Click to hide internal directories.