本文整理匯總了Java中com.badlogic.gdx.graphics.Color.BLUE屬性的典型用法代碼示例。如果您正苦於以下問題:Java Color.BLUE屬性的具體用法?Java Color.BLUE怎麽用?Java Color.BLUE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.badlogic.gdx.graphics.Color
的用法示例。
在下文中一共展示了Color.BLUE屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: convertColor
private Color convertColor(CustomColor color) {
switch(color) {
case WHITE:
return Color.WHITE;
case BLACK:
return Color.BLACK;
case BLUE:
return Color.BLUE;
default:
return Color.RED;
}
}
示例2: updateButton
@Override
public void updateButton(Button element, Float dt) {
if (Gdx.input.isButtonPressed(Input.Buttons.LEFT)) {
if (element.
contains(new Point(
(float) Gdx.input.getX(),
(float) Gdx.input.getY()
))) {
element.color = Color.BLUE;
element.action.run();
}
} else {
element.color = Color.WHITE;
}
}
示例3: convertColor
private Color convertColor(CustomColor color) {
switch (color) {
case WHITE:
return Color.WHITE;
case BLACK:
return Color.BLACK;
case BLUE:
return Color.BLUE;
default:
return Color.RED;
}
}
示例4: detcolor
public Color detcolor(int c){
switch (c){
case 1:{
return Color.RED;
}
case 2:{
return Color.BLUE;
}
case 3:{
return Color.GREEN;
}
}
return Color.BLACK;
}
示例5: TutorialDialog
public TutorialDialog(GameManager gMaps){
super("", new WindowStyle(new BitmapFont(false), Color.BLUE, new BaseDrawable()));
this.gameManager = gMaps;
}
示例6: ManaReplenishLabel
public ManaReplenishLabel(String message, GameObject source)
{
super(message, source, Color.BLUE);
}
示例7: init
private void init() {
//開始界麵控件初始化
mAtlas = MyGdxGame.assetManager.getTextureAtlas(Constant.START_SETTING);
mRangeAtlas = MyGdxGame.assetManager.getTextureAtlas(Constant.RANGE_WIDGET);
mStartBtn = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("startBtnUp")),
new TextureRegionDrawable(mAtlas.findRegion("startBtnDown")));
mSettingBtn = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("settingBtnUp")),
new TextureRegionDrawable(mAtlas.findRegion("settingBtnDown")));
mStartBtn.setSize(280, 100);
mSettingBtn.setSize(280, 100);
//輸入姓名對話框
mInputnameDialog = new InputnameDialog(MyGdxGame.VIEW_WIDTH / 2, MyGdxGame.VIEW_HEIGHT / 2);
//警告對話框
mWarningDialog = new NameWarningDialog(MyGdxGame.SCREEN_WIDTH / 2, MyGdxGame.SCREEN_HEIGHT / 2);
//開始界麵 - 排行榜
mRangeBtn = new ImageButton(new TextureRegionDrawable(mRangeAtlas.findRegion("rangeBtnUp")),
new TextureRegionDrawable(mRangeAtlas.findRegion("rangeBtnDown")));
mRangeBtn.setSize(280, 100);
//初始化排行榜對話框
mRangeDialog = new RankingDialog(MyGdxGame.SCREEN_WIDTH / 2, MyGdxGame.SCREEN_HEIGHT / 2);
mStartBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 20, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 20);
mRangeBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 100);
mSettingBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 180);
//設置界麵初始化 - 是否打開音效
Drawable checkOn = new TextureRegionDrawable(mAtlas.findRegion("musicBtnOn"));
Drawable checkOff = new TextureRegionDrawable(mAtlas.findRegion("musicBtnOff"));
CheckBox.CheckBoxStyle boxStyle = new CheckBox.CheckBoxStyle(checkOff, checkOn,
MyGdxGame.assetManager.getFont(), Color.BLUE);
mCheckBox = new CheckBox("", boxStyle);
mCheckBox.setSize(255, 100);
mCheckBox.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 38, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 40);
if (isPlay) {
mCheckBox.setChecked(true);
} else {
mCheckBox.setChecked(false);
}
//設置界麵初始化 - 關於我們
mAboutBtn = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("aboutBtnUp")),
new TextureRegionDrawable(mAtlas.findRegion("aboutBtnDown")));
mAboutBtn.setSize(280, 100);
mAboutBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 110);
mAboutGameDialog = new AboutGameDialog(MyGdxGame.SCREEN_WIDTH / 2, MyGdxGame.SCREEN_HEIGHT / 2);
//設置界麵初始化 - 返回按鈕
mBackButton = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("backStartBtnUp")),
new TextureRegionDrawable(mAtlas.findRegion("backStartBtnDown")));
mBackButton.setSize(280, 100);
mBackButton.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 180);
//背景音樂
if (isPlay) {
MyGdxGame.assetManager.getMusic(Constant.START_BGM).play();
} else {
MyGdxGame.assetManager.getMusic(Constant.START_BGM).pause();
}
//初始化監聽
initListener();
}