最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
robotlegs使用例子的笔记
时间:2022-06-28 22:12:19 编辑:袖梨 来源:一聚教程网
先放上我写的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 不存储数据
相关文章
- 燕云十六声牵丝玉止戈怎么玩 12-16
- 126邮箱免费登录极速版上线-126邮箱与163邮箱功能区别全解析 12-16
- deepseek官网入口在哪-deepseek网页版直达链接 12-16
- 光与影33号远征队复活悖论:复活悖论符文效果与获取方式详解 12-16
- 逃离鸭科夫结局有几个 结局0和结局1达成条件一览 12-16
- 学信网官网登录入口-高等教育学历查询官方通道 12-16