当前位置: 首页>>代码示例>>Java>>正文


Java ScreenOrientation.LANDSCAPE_FIXED属性代码示例

本文整理汇总了Java中org.andengine.engine.options.ScreenOrientation.LANDSCAPE_FIXED属性的典型用法代码示例。如果您正苦于以下问题:Java ScreenOrientation.LANDSCAPE_FIXED属性的具体用法?Java ScreenOrientation.LANDSCAPE_FIXED怎么用?Java ScreenOrientation.LANDSCAPE_FIXED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.andengine.engine.options.ScreenOrientation的用法示例。


在下文中一共展示了ScreenOrientation.LANDSCAPE_FIXED属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
	// サイズを指定し描画範囲をインスタンス化
	final Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
	// ゲームのエンジンを初期化
	EngineOptions eo = new EngineOptions(
			// タイトルバー非表示モード
			true, 
			// 画面横向き
			ScreenOrientation.LANDSCAPE_FIXED,  
			// 画面解像度の縦横比を保ったまま最大まで拡大
			new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT),
			 // 描画範囲
			camera);
	
	// 効果音とBGMの使用を許可する
	eo.getAudioOptions().setNeedsSound(true);
	eo.getAudioOptions().setNeedsMusic(true);
	
	return eo;
}
 
开发者ID:kyokomi,项目名称:AndEngineSRPGQuest,代码行数:21,代码来源:MainActivity.java

示例2: onCreateEngineOptions

@Override
	public EngineOptions onCreateEngineOptions() {
		Log.d("debug", "masuk activity PlayScene");
		activity = MainGameActivity.getSharedInstance();
		
		//get the sensor service
		mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
		//get the accelerometer sensor
		mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
//		mAcceleration = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION);
		
		EngineOptions engineOptions = new EngineOptions(true,
				ScreenOrientation.LANDSCAPE_FIXED, new FillResolutionPolicy(), activity.mCamera);
		
		final ConfigChooserOptions configChooserOptions = engineOptions.getRenderOptions().getConfigChooserOptions();
		configChooserOptions.setRequestedRedSize(8);
		configChooserOptions.setRequestedGreenSize(8);
		configChooserOptions.setRequestedBlueSize(8);
		configChooserOptions.setRequestedAlphaSize(8);
		configChooserOptions.setRequestedDepthSize(16);
		
		return engineOptions;
	}
 
开发者ID:erisazani,项目名称:MissionInsectible,代码行数:23,代码来源:PlayScene.java

示例3: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
       setVolumeControlStream(AudioManager.STREAM_MUSIC);
       
       Intent intent = getIntent();
       mPlayer1 = intent.getParcelableExtra(EXTRA_PLAYER_1);
       mPlayer2 = intent.getParcelableExtra(EXTRA_PLAYER_2);
       mMatch = new Match(mPlayer1, mPlayer2, 0, 0);
       GameScene.setMatch(mMatch);
       mIsTournamentMatch = intent.getBooleanExtra(EXTRA_IS_TOURNAMENT_MATCH, false);
       mSelfIsHome = intent.getBooleanExtra(EXTRA_SELF_IS_HOME, true);

       mApp = MyApp.getInstance();
       mVolumeMode = mApp.getVolumeMode();
	mCamera = new BoundCamera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
	EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), mCamera);
	engineOptions.getRenderOptions().setDithering(true); // enable dithering for this engine
	engineOptions.getAudioOptions().setNeedsMusic(true).setNeedsSound(true); // enable sound and music
	engineOptions.getTouchOptions().setNeedsMultiTouch(true); // enable multi-touch for left/right and up button
	return engineOptions;
}
 
开发者ID:delight-im,项目名称:NationSoccer,代码行数:21,代码来源:GameScreenSingle.java

示例4: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
    EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED,
            new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), main_camera);
    engineOptions.getAudioOptions().setNeedsSound(true);
    return engineOptions;
}
 
开发者ID:Linguaculturalists,项目名称:Phoenicia,代码行数:7,代码来源:TestActivity.java

示例5: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
	
	// initialize camera
	final Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
	
	// create engine options
	EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera);
	
	// enable sound and music
	engineOptions.getAudioOptions().setNeedsSound(true).setNeedsMusic(true);
	
	return engineOptions;
}
 
开发者ID:tamzi,项目名称:sophia,代码行数:14,代码来源:TowerDefense.java

示例6: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
	Log.d("RS", "onCreateEngineOptions");
	this.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
	EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), this.mCamera);
	engineOptions.getTouchOptions().setNeedsMultiTouch(true);
	return engineOptions;
}
 
开发者ID:Callilf,项目名称:RotatingSentries,代码行数:8,代码来源:ParentGameActivity.java

示例7: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
	Log.d("RS", "[MENU] onCreateEngineOptions");
	Camera mCamera = new Camera(0, 0, ParentGameActivity.CAMERA_WIDTH, ParentGameActivity.CAMERA_HEIGHT);
	EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, 
			new RatioResolutionPolicy(ParentGameActivity.CAMERA_WIDTH, ParentGameActivity.CAMERA_HEIGHT), mCamera);
	//engineOptions.getTouchOptions().setNeedsMultiTouch(true);
	return engineOptions;
}
 
开发者ID:Callilf,项目名称:RotatingSentries,代码行数:9,代码来源:MainMenuActivity.java

示例8: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
	camera = new Camera(0, 0, Consts.SCREEN_HEIGHT, Consts.SCREEN_WIDTH);
	EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, 
			new RatioResolutionPolicy(Consts.SCREEN_HEIGHT, Consts.SCREEN_WIDTH), this.camera);
	engineOptions.getAudioOptions().setNeedsMusic(true).setNeedsSound(true);
	engineOptions.setWakeLockOptions(WakeLockOptions.SCREEN_ON);
	return engineOptions;
}
 
开发者ID:thoinv,项目名称:kaorisan,代码行数:9,代码来源:GameActivity.java

示例9: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
    mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
    IResolutionPolicy resolutionPolicy =
            new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT);

    return new EngineOptions(true,
            ScreenOrientation.LANDSCAPE_FIXED,
            resolutionPolicy,
            mCamera);
}
 
开发者ID:Phonbopit,项目名称:30-android-libraries-in-30-days,代码行数:11,代码来源:AndEngineActivity.java

示例10: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
	Log.d("debug", "masuk activity MainGameActivity");
	// TODO Auto-generated method stub
	instance = this;
	mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);		
	// engineOptions = new EngineOptions(true,
	// 		ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), mCamera);
	final EngineOptions engineOptions = new EngineOptions(true,
			ScreenOrientation.LANDSCAPE_FIXED, new FillResolutionPolicy(), mCamera);
	engineOptions.getAudioOptions().setNeedsSound(true);
	engineOptions.getAudioOptions().setNeedsMusic(true);
	return engineOptions;
}
 
开发者ID:erisazani,项目名称:MissionInsectible,代码行数:14,代码来源:MainGameActivity.java

示例11: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
    // Camera
    mCamera = new Camera(0, 0, WIDTH, HEIGHT);

    // Engine options
    EngineOptions engineOptions = new EngineOptions(true,
            ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(RATIO), mCamera);

    // Screen always turned on
    engineOptions.setWakeLockOptions(WakeLockOptions.SCREEN_ON);

    // Music
    engineOptions.getAudioOptions().setNeedsMusic(true);

    // Sound
    engineOptions.getAudioOptions().setNeedsSound(true);

    // Controls
    if (android.os.Build.MANUFACTURER.equals("OUYA")){ //... Device is an OUYA...
        NinjaTrials.OUYA_CONTROL = true;
        OuyaController.init(this); // Necessary to listen for Ouya Controller's analogic events
    }
    else{ //... Device is something else...
        NinjaTrials.OUYA_CONTROL = false;
    }

    // Return the engineOptions object, passing it to the engine
    return engineOptions;
}
 
开发者ID:jjhaggar,项目名称:ninja-trials,代码行数:30,代码来源:NinjaTrials.java

示例12: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() {
	final Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
	EngineOptions eo = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, 
			new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera);
	eo.getAudioOptions().setNeedsMusic(true);
	
	return eo;
}
 
开发者ID:Tacohen,项目名称:Killbots,代码行数:9,代码来源:UICanvas.java

示例13: onCreateEngineOptions

@Override
public EngineOptions onCreateEngineOptions() 
{
	camera = new BoundCamera(0, 0, 800, 480);
	EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new FillResolutionPolicy(), camera);
	engineOptions.getAudioOptions().setNeedsMusic(true).setNeedsSound(true);
	engineOptions.setWakeLockOptions(WakeLockOptions.SCREEN_ON);
	 
	return engineOptions;
}
 
开发者ID:LHBDev,项目名称:MoonMiner,代码行数:10,代码来源:MainActivity.java


注:本文中的org.andengine.engine.options.ScreenOrientation.LANDSCAPE_FIXED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。