AndEngine 分析之6-Entity
AndEngine 分析之六-----Entity
Entity:
An
Entitiy is an object that can be drawn, like Sprites, Rectangles, Text
or Lines. An Entity has a position/rotation/scale/color/etc...
一个entitiy是一个可以被画的物体,像Sprites,矩形,文本或线。一个实体有一个位置/旋转/重力/彩色/等等
1.IEntity接口
public interface IEntity extends IDrawable, IUpdateHandler { public int getZIndex(); public void setZIndex(final int pZIndex); }
2.IDrawable接口
public interface IDrawable { public void onDraw(final GL10 pGL, final Camera pCamera); }
3.IUpdateHandler接口
public interface IUpdateHandler { public void onUpdate(final float pSecondsElapsed); public void reset(); }