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


Java Color.BLACK属性代码示例

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


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

示例1: loadGameFonts

public void loadGameFonts() {

        mTypeface = Typeface.createFromAsset(mContext.getAssets(), "LCD.ttf");
        final ITexture scoreTexture = new BitmapTextureAtlas(mContext.getTextureManager(), 256, 512, TextureOptions.BILINEAR);
        mGameFont = new Font(mContext.getFontManager(), scoreTexture, mTypeface, 18, true, new Color(Color.BLACK));
        scoreTexture.load();
        mGameFont.load();

        final BitmapTextureAtlas gamePlayTexture = new BitmapTextureAtlas(mContext.getTextureManager(), 512, 512, TextureOptions.BILINEAR);
        mGamePlayFont = new StrokeFont(mContext.getFontManager(), gamePlayTexture, mTypeface, 96, true, new Color(Color.WHITE), 0, new Color(Color.WHITE));
        gamePlayTexture.load();
        mGamePlayFont.load();

    }
 
开发者ID:peterchaula,项目名称:ClassicF1,代码行数:14,代码来源:ResourceManager.java

示例2: loadGameFonts

private void loadGameFonts() {
	this.mFontTexture_score = new BitmapTextureAtlas(activity.getTextureManager(), score_width, score_height, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
	this.mFontTexture_score2 = new BitmapTextureAtlas(activity.getTextureManager(), score2_width, score2_height, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
	this.mFontTexture_score_best = new BitmapTextureAtlas(activity.getTextureManager(), score_best_width, score_best_height, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
	
	this.mFont = new Font(activity.getFontManager(), this.mFontTexture_score, Typeface.create(Typeface.DEFAULT, Typeface.BOLD), 24, true, Color.BLACK);
	this.mFont = new Font(activity.getFontManager(), this.mFontTexture_score2, Typeface.create(Typeface.DEFAULT, Typeface.BOLD), 24, true, Color.BLACK);
	this.mFont = new Font(activity.getFontManager(), this.mFontTexture_score_best, Typeface.create(Typeface.DEFAULT, Typeface.BOLD), 24, true, Color.BLACK);
	
	activity.getTextureManager().loadTexture(this.mFontTexture_score);
	activity.getTextureManager().loadTexture(this.mFontTexture_score2);
	activity.getTextureManager().loadTexture(this.mFontTexture_score_best);
	activity.getFontManager().loadFont(this.mFont);
}
 
开发者ID:thoinv,项目名称:kaorisan,代码行数:14,代码来源:ResourcesManager.java

示例3: addBackground

private void addBackground() {

        background = new Background(Color.BLACK);
        setBackground(background);
    }
 
开发者ID:djschilling,项目名称:sopa,代码行数:5,代码来源:GameScene.java

示例4: init

private void init(KeyListenScene pBaseScene) {
	// 共通ウィンドウを作成
	CommonWindowRectangle comonWindowRectangle = new CommonWindowRectangle(
			0,
			0,
			pBaseScene.getWindowWidth(), 
			pBaseScene.getWindowHeight(),
			Color.BLACK, 0.8f,
			pBaseScene);
	attachChild(comonWindowRectangle);
	// タイトル
	float titleY = 12;
	Font titleFont = pBaseScene.createFont(Typeface.DEFAULT_BOLD, 30, Color.WHITE);
	Text titleText = new Text(10, 10, titleFont, "〜 経験値振り分け 〜", 
			pBaseScene.getBaseActivity().getVertexBufferObjectManager());
	pBaseScene.placeToCenterX(titleText, titleY);
	attachChild(titleText);
	
	float titleLineY = titleText.getY() + titleText.getHeight() + 4;
	
	Line line = new Line(10, titleLineY, pBaseScene.getWindowWidth() - 16, titleLineY, 
			pBaseScene.getBaseActivity().getVertexBufferObjectManager());
	line.setLineWidth(1);
	line.setColor(Color.WHITE);
	line.setAlpha(1.0f);
	attachChild(line);
	
	TextLogic textLogic = new TextLogic();
	Font defaultFont = pBaseScene.createFont(Typeface.SANS_SERIF, 16, Color.WHITE);
	Font paramFont = pBaseScene.createFont(Typeface.DEFAULT, 16, Color.YELLOW);
	//Font upParamFont = pBaseScene.createFont(Typeface.DEFAULT, 16, Color.BLUE);
	// Expの表示
	float expY = titleLineY + 4;
	Rectangle totalExpTextRect = textLogic.createTextRectangle("所持経験値:", defaultFont, "100 Exp", paramFont, 
			pBaseScene.getBaseActivity().getVertexBufferObjectManager());
	attachChild(totalExpTextRect);
	
	Rectangle afterExpTextRect = textLogic.createTextRectangle("振り分け後経験値:", defaultFont, "0 Exp", paramFont, 
			pBaseScene.getBaseActivity().getVertexBufferObjectManager());
	attachChild(afterExpTextRect);
	
	totalExpTextRect.setPosition(pBaseScene.getWindowWidth() / 2 -
			(totalExpTextRect.getX() + totalExpTextRect.getWidth() + 50 + afterExpTextRect.getWidth()) / 2, expY);

	afterExpTextRect.setPosition(
			totalExpTextRect.getX() + totalExpTextRect.getWidth() + 50,
			totalExpTextRect.getY());
	
	float expLineY = totalExpTextRect.getY() + totalExpTextRect.getHeight() + 4;
	Line expLine = new Line(10, expLineY, pBaseScene.getWindowWidth() - 16, expLineY, 
			pBaseScene.getBaseActivity().getVertexBufferObjectManager());
	expLine.setLineWidth(1);
	expLine.setColor(Color.WHITE);
	expLine.setAlpha(1.0f);
	attachChild(expLine);
	
	// プレイヤー情報
	float playerX = 12;
	float playerY = expLineY + 12;
	
	ActorPlayerLogic actorPlayerLogic = new ActorPlayerLogic();
	ActorPlayerDto actorPlayerDto = actorPlayerLogic.createActorPlayerDto(pBaseScene, 1);
	
	PlayerStatusRectangle playerStatusRectangle = new PlayerStatusRectangle(pBaseScene, defaultFont, 
			actorPlayerDto, ActorSpriteUtil.getFaceFileName(actorPlayerDto.getImageResId()), playerX, playerY);
	playerStatusRectangle.show(PlayerStatusRectangleType.MINI_STATUS);
	attachChild(playerStatusRectangle);
}
 
开发者ID:kyokomi,项目名称:AndEngineSRPGQuest,代码行数:68,代码来源:ExpDistributionLayer.java


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