ApplicationListener,Game,Screen,Stage,Actor,Group

Stage:舞台,Actor的容器,处理成员的触摸,动画,绘制等。
Actor:演员,源码的解释是,Actor是Stage,或者Stage里面的Group的一部分。它有坐标,宽高,缩放比例等。
Group:A group is an Actor that contains other Actors (also other Groups which are Actors).
Game:实现接口ApplicationListener类,所以跟ApplicationListener的功能差不多。两者最主要的区别是:Game和Screen配合可以让应用在多个屏幕中切换,而
ApplicationListener只能有一个屏幕。
Screen:应用屏幕。


Stage继承于InputAdapter,所以包含了Input事件:触摸和键盘事件。Stage最主要的成员是root(Group),整个类的大部分函数是在处理这个成员。
Group 是一个Actor的容器,其本身也是Actor的子类。
主要的几个成员:
//Actor的容器,存放Group和单个Actor
protected final List<Actor> children;
//存放Group
protected final List<Group> groups;
//存放初实例化时候带有名字的Actor
protected final ObjectMap<String, Actor> namesToActors;
Actor舞台上的单个活动成员。


附录:

      AndroidApplication
          |
          |
           Game
          |
      |——|———|———|
     Screen Screen Screen Screen
      |
     Stage
     / \
   Actor Actor

    |
    Actor

转载于:https://www.cnblogs.com/mogul/archive/2013/04/01/2993356.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值