SimpleBaseGameActivity

编写Activity继承SimpleBaseGameActivity

/**
* DefName -->自定义
*/
public
class DefNameActivity extends SimpleBaseGameActivity {
@Override
public EngineOptions onCreateEngineOptions() { // 创建一些参数选项 return null; } @Override protected void onCreateResources() { // 创建资源 } @Override protected Scene onCreateScene() { // 创建场景 return null; } }

会默认重写三个方法 onCreateEngineOptions()、onCreateResources()、onCreateScene()

EngineOptions类
构造方法
public EngineOptions(
    final boolean pFullscreen, 
    final ScreenOrientation pScreenOrientation, 
    final IResolutionPolicy pResolutionPolicy, 
    final Camera pCamera)
    
    ScreenOrientation 枚举类
    public enum ScreenOrientation
    { // 去除注释的源码
        LANDSCAPE_FIXED,
        LANDSCAPE_SENSOR,
        PORTRAIT_FIXED,
        PORTRAIT_SENSOR;
    }

    IResolutionPolicy 接口
    已实现的接口类 BaseResolutionPolicy 
    BaseResolutionPolicy的子类
        FillResolutionPolicy
        FixedResolutionPolicy
        RatioResolutionPolicy
        RelativeResolutionPolicy
        
    Camera 类
    构造方法
    public Camera(
        final float pX, 
        final float pY, 
        final float pWidth, 
        final float pHeight)
Scene类
构造方法    
public Scene()
public Scene(final int pChildCount) // 已过时
posted on 2013-08-05 14:39  麥籽  阅读(239)  评论(0编辑  收藏  举报