文件名称:StateMachine
介绍说明--下载内容来自于网络,使用问题请自行百度
一个有限状态机的编程范例
StateMachine包 状态机管理
IStateMachine.as 状态机接口
MyEvent_Control.as 消息管理,状态管理
MyEvent_Single.as 单个事件
Total.as 实现了状态机接口(IStateMachine)的基类,将其理解为抽象类比较好
A.as 继承基类(Total)的状态机,这个才是真正可用的
B.as 同A
Main.as 调用,以及启动
若要使用本状态机
前提:
1.你的基类名字叫basis.as
2.你继承基类的名字static.as
对应:
1.basis.as -- 相当于 Total.as
2.static.as -- 相当于 A.as
类功能:
参考"类说明.txt"
注:
1.管理类为静态类
使用“MyEvent_Control.istanceFun() ”来取到实例
消息部分-公开
-- //供外部调用的 发送消息 send()
状态机部分--公开
-- //绑定一个状态机 add_StateMachine(_idx)
-- //开启状态机 Start_StateMachine(_modo:int=0,_idx=null)
-- //状态更新 stateUpdate(_idx,str)
2.关于全局消息,和局部消息中
-- 使用 "e.sender" 来获取消息的发送者-A state machine programming paradigm StateMachine package management IStateMachine.as state machine interfaces MyEvent_Control.as message management finite state machine, state management MyEvent_Single.as single event Total.as implements a state machine interfaces (IStateMachine) base class, be understood as An abstract class is better A.as inherit the base class (Total) state machine, this is the real available B.as with A Main.as calls, and start to use the state machine premise: a name of your base class You inherit called basis.as 2 corresponds to the base class name static.as:. 1.basis.as- equivalent Total.as 2.static.as- functional equivalent A.as: Refer to " class descr iption txt " Note: 1 static class management class to use." MyEvent_Control.istanceFun () " to get to the instance of the message part- publicly-// for external calls to send a message send () state machine part- publicly-// bind a state machine add_StateMachine (_idx)-// open state machine Star
StateMachine包 状态机管理
IStateMachine.as 状态机接口
MyEvent_Control.as 消息管理,状态管理
MyEvent_Single.as 单个事件
Total.as 实现了状态机接口(IStateMachine)的基类,将其理解为抽象类比较好
A.as 继承基类(Total)的状态机,这个才是真正可用的
B.as 同A
Main.as 调用,以及启动
若要使用本状态机
前提:
1.你的基类名字叫basis.as
2.你继承基类的名字static.as
对应:
1.basis.as -- 相当于 Total.as
2.static.as -- 相当于 A.as
类功能:
参考"类说明.txt"
注:
1.管理类为静态类
使用“MyEvent_Control.istanceFun() ”来取到实例
消息部分-公开
-- //供外部调用的 发送消息 send()
状态机部分--公开
-- //绑定一个状态机 add_StateMachine(_idx)
-- //开启状态机 Start_StateMachine(_modo:int=0,_idx=null)
-- //状态更新 stateUpdate(_idx,str)
2.关于全局消息,和局部消息中
-- 使用 "e.sender" 来获取消息的发送者-A state machine programming paradigm StateMachine package management IStateMachine.as state machine interfaces MyEvent_Control.as message management finite state machine, state management MyEvent_Single.as single event Total.as implements a state machine interfaces (IStateMachine) base class, be understood as An abstract class is better A.as inherit the base class (Total) state machine, this is the real available B.as with A Main.as calls, and start to use the state machine premise: a name of your base class You inherit called basis.as 2 corresponds to the base class name static.as:. 1.basis.as- equivalent Total.as 2.static.as- functional equivalent A.as: Refer to " class descr iption txt " Note: 1 static class management class to use." MyEvent_Control.istanceFun () " to get to the instance of the message part- publicly-// for external calls to send a message send () state machine part- publicly-// bind a state machine add_StateMachine (_idx)-// open state machine Star
(系统自动生成,下载前可以参看下载内容)
下载文件列表
StateMachine/IStateMachine.as
StateMachine/MyEvent_Control.as
StateMachine/MyEvent_Single.as
A.as
B.as
Main.as
Main.fla
Main.swf
Total.as
类说明.txt
使用说明.txt
StateMachine
StateMachine/MyEvent_Control.as
StateMachine/MyEvent_Single.as
A.as
B.as
Main.as
Main.fla
Main.swf
Total.as
类说明.txt
使用说明.txt
StateMachine
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.