先放上我写的demo吧,明天回老家,等下周来了继续写哈~
as文件
| 代码如下 | 复制代码 |
| package { import com.pztai.example.AppConfig; import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import robotlegs.bender.bundles.mvcs.MVCSBundle; import robotlegs.bender.extensions.contextView.ContextView; import robotlegs.bender.framework.api.IContext; import robotlegs.bender.framework.impl.Context; import flash.events.IEventDispatcher; import com.pztai.example.view.events.indexViewEvent; public class vcandroid extends Sprite { private var _context:IContext; public function vcandroid() { super(); // 支持 autoOrient stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; _context = new Context() .install(MVCSBundle) .configure(AppConfig) .configure(new ContextView(this)); } } } |
|
xml文件
| 代码如下 | 复制代码 |
|
|
|
这个demo仅仅实现了核心的交互
其中需要注意的地方
1.AppConfi.as 里面的注入要写在config()函数里面
2.command触发事件 要写在mediator里面,逻辑部分最好都写在command 里面
3.model 不存储数据
模拟极限越野
模拟极限越野开着大巴在各种奇葩路况里送乘客。山路弯道多得让人
模拟火车
模拟火车让你当回真正的火车司机,得先学会看信号灯、操作控制杆
可口的披萨美味的披萨
可口的披萨美味的披萨带您体验经营一家披萨店的乐趣。游戏画风温
定制虚拟偶像最新版
定制虚拟偶像最新版是一款超级经典有趣的日本模拟装扮类型的手游
病娇模拟器手机版正版(yandere simulator)
病娇模拟器最新版手游是一款萌妹二次元模拟游戏,玩家在游戏中可