码迷,mamicode.com
首页 > 其他好文 > 详细

uFrame 1.6 官方文档随意翻译(一)

时间:2017-01-08 17:32:46      阅读:272      评论:0      收藏:0      [点我收藏+]

标签:框架   信息   场景   service   ade   amp   建议   其他   容器   

前言:

  建议直接看官方英文文档,下面都是一些简单的翻译。


 The Kernel 

  The Kernel是uFrame的本质,负责处理加载场景,系统和服务。


 Subsystems 

作为一个容器,组成许多Nodes。 

Subsystems允许你分离项目中的逻辑部分和可复用部分。 

System Loaders

System Loaders常用语初始化信息。


 Node 

  Elements

  主要负责ViewModel(Unity中uFrame框架附带了Controller)部分 

  For example, Player element could contain information about player properties like health, running speed, obtained weapons or 
  actions; Shoot, TakeDamage or Die. 

  一个Elements会创建对应的ViewModel和Controller类 

  技术分享

  Inheritance(继承)

  如下图,可以连接两个elements,后者继承前者。 SettingsScreen Element will contain the IsActive property and Close command of its parent SubScreen.

  技术分享


   Views

    游戏中的表现层(数据来源与ViewModel绑定)。 

    For instance, a PlayerView should probably exist on some kind of Player GameObject, and a PlayerHUDView should probably exist on some kind of GUI GameObject to bind to and express a player’s stats and other properties.

    Inspector options

      ViewModel Indentifier  关联的ViewModel的标识,可指定。 

      Dispose On Destroy  若勾选上, View被销毁是,ViewModel也被销毁。

      Initialize ViewModel  是否自己来初始化ViewModel属性值。


   View components

    用于扩展View的功能(一些方法)。 

    例子:https://github.com/InvertGames/uFrame.Documentation/blob/master/uFrameMVVM/pages/nodes/view-component-node.md


   Enums

    用于定义新的属性类型(枚举)给Elements使用。


  Scene Types

为了使用uFrame加载/卸载场景,必须使用Scene Types创建以便于给uFrame识别。 

可以定义怎样加载/卸载场景。 

可以多个场景共用一个Scene Types(有什么意义?案例中的选择关卡,多个关卡场景共用一个Scene Types) 

    Scene Types存在在一个场景的游戏入口,因为uFrame需要知道哪些场景被加载和保存 场景的引用,在需要移除场景时。

    Scene Type Settings 

      可以使用它来pass data给场景加载。

    Generated Scene Types Scene Type是mono behaviour。让uFrame关联监听场景(当场景加载或被卸载时)。

    Scene Loader 

一个Scene Type生成一个Scene Loader,交给uFrame Kernel管理。 

专门负责对应的Scene Type加载/卸载的一些功能。 

LoadScene() 对应 Unity’s LoadSceneAdditively() 

UnloadScene() 对应 the scene root game object is destroyed


  Service Node

    Service也是交给uFrame Kernel管理。 

    可以写一些Commands和Events让Service订阅。 

    字面上的意思,提供一些服务给其他节点。


  Simple Classes

    自定义的类。


  Type References(看文档)

  可以指定新的类型在其他Nodes使用。 

  不会被uFrame生成,要自己创建。 


Command Node

  能被事件系统订阅。 

  一般用来传递数据给Controller


Computed Properties

  根据properties来计算得出另一些属性。比如血量少于0则得出死亡属性。


 

 

uFrame 1.6 官方文档随意翻译(一)

标签:框架   信息   场景   service   ade   amp   建议   其他   容器   

原文地址:http://www.cnblogs.com/SeaSwallow/p/6262125.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!