示例#1
0
  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    this.hideVirtualButton();

    onLoadNativeLibraries();

    sContext = this;
    this.mHandler = new Cocos2dxHandler(this);

    Cocos2dxHelper.init(this);

    this.mGLContextAttrs = getGLContextAttrs();
    this.init();

    if (mVideoHelper == null) {
      mVideoHelper = new Cocos2dxVideoHelper(this, mFrameLayout);
    }

    if (mWebViewHelper == null) {
      mWebViewHelper = new Cocos2dxWebViewHelper(mFrameLayout);
    }

    if (mEditBoxHelper == null) {
      mEditBoxHelper = new Cocos2dxEditBoxHelper(mFrameLayout);
    }

    Window window = this.getWindow();
    window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);

    this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
  }
  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    onLoadNativeLibraries();

    sContext = this;
    this.mHandler = new Cocos2dxHandler(this);

    Cocos2dxHelper.init(this);

    this.init();
    if (mVideoHelper == null) {
      mVideoHelper = new Cocos2dxVideoHelper(this, mFrameLayout);
    }
  }
  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    CocosPlayClient.init(this, false);
    onLoadNativeLibraries();
    SDKBox.init(this);

    sContext = this;
    this.mHandler = new Cocos2dxHandler(this);

    Cocos2dxHelper.init(this);

    this.mGLContextAttrs = getGLContextAttrs();
    this.init();

    if (mVideoHelper == null) {
      mVideoHelper = new Cocos2dxVideoHelper(this, mFrameLayout);
    }

    if (mWebViewHelper == null) {
      mWebViewHelper = new Cocos2dxWebViewHelper(mFrameLayout);
    }
  }