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


Java Color.WHITE属性代码示例

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


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

示例1: Hud

public Hud(SpriteBatch sb) {
    countKill = 0;
    viewport = new FitViewport(ScreenConf.V_WIDTH, ScreenConf.V_HEIGHT, new OrthographicCamera());

    stage = new Stage(viewport, sb);

    Table table = new Table();
    table.setFillParent(true);
    table.top();

    countKillLabel = new Label(String.format("%03d", countKill), new Label.LabelStyle(new BitmapFont(), Color.WHITE));

    table.add(countKillLabel).expandX().padTop(10);
    table.add().expandX();
    table.add().expandX();
    table.add().expandX();
    stage.addActor(table);

}
 
开发者ID:MSLacerda,项目名称:DarkDay,代码行数:19,代码来源:Hud.java

示例2: screenExit

public void screenExit(String message){
        messageShow = message;
        showtextexit = true;
        circleShow = false;
        InformationProfile.getInstance().getDateUserGame().setEnklaveCombatId(-1);
        Label labelmess = new Label("You already joined this combat once!",new Label.LabelStyle(bitmapFont,Color.WHITE));
        labelmess.setPosition(WIDTH /2 - labelmess.getWidth() /2,labelmess.getHeight()*2);
        stage.addActor(labelmess);
        combatFight.deselect();
        attachers.deselect();
        defenders.deselect();
        if(!message.contentEquals("You lose!")){
            new Timer().scheduleTask(new Timer.Task() {
                @Override
                public void run() {
                    managerAssets.getAssertEnklaveScreen().setIsupdate(false);
                    new GetEnklaveDetails().makeRequest(InformationEnklave.getInstance().getId(), managerAssets);
//                    gameManager.setScreen(gameManager.screenEnklave);
                }
            },1);
        }
    }
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:22,代码来源:ScreenCombat.java

示例3: createTitle

private void createTitle() {
    BitmapFont titleFont = generateFont(124, true);
    titleFont.getData().markupEnabled = true;
    Label title = new Label(String.format("[#%s]P[] o l y [#%s]m[] o r p [#%s]h[]",
                                ShapeColor.RED.color, ShapeColor.GREEN.color, ShapeColor.BLUE.color),
                            new LabelStyle(titleFont, Color.WHITE));
    title.setPosition(Polymorph.WORLD_WIDTH/2 - title.getWidth()/2, 4*Polymorph.WORLD_HEIGHT/5.5f);

    stage.addActor(title);
}
 
开发者ID:DurianHLN,项目名称:Polymorph,代码行数:10,代码来源:MainMenu.java

示例4: InfoMenu

public InfoMenu(String labelText, String buttonText) {
	super();
	text = new Label(labelText, new LabelStyle(Fonts.hud, Color.WHITE));
	text.setAlignment(Align.center, Align.center);
	button = new TextButton(buttonText, skin);

	stage.addActor(text);
	stage.addActor(button);
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:9,代码来源:InfoMenu.java

示例5: SplashMenu

public SplashMenu() {
  logo = new Image(new TextureRegionDrawable(Assets.getTextureRegion("core:logo.png")), Scaling.fillY, Align.center);
  text = new Label("Loading " + Branding.DEBUG, new Label.LabelStyle(Fonts.smallHUD, Color.WHITE));

  stage.addActor(logo);
  stage.addActor(text);
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:7,代码来源:SplashMenu.java

示例6: addDescriptorModel

private void addDescriptorModel(){
    float ypos = camera.project(arrayDecal.get(centerisequal).getPosition().cpy()).y - (HEIGHT * 0.195f);
    labelDesc = new Label(nameRes.get(0),new Label.LabelStyle(Font.getFont((int)(HEIGHT*0.03f)),Color.WHITE));labelDesc.setAlignment(Align.center);
    labelDesc.setPosition(WIDTH/2-labelDesc.getWidth()/2,ypos+labelDesc.getHeight());//HEIGHT*0.485f);
    labelValue = new Label(String.valueOf(Math.round(InformationProfile.getInstance().getDateUserGame().getScrap())),new Label.LabelStyle(Font.getFont((int)(HEIGHT*0.025f)),Color.ORANGE));
    labelValue.setPosition(WIDTH/2-labelValue.getWidth()/2,ypos);labelValue.setAlignment(Align.center);
    progressbar = ProgressBarEnergy.getInstance();
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:8,代码来源:ScreenCrafting.java

示例7: JoinGameScene

/**
 * Construct and initialize main menu scene.
 *
 * @param sceneData Contained class shared amongst scenes.
 */
public JoinGameScene(SceneData sceneData) {
    super(SceneNames.JOIN_GAME_SCENE, Color.WHITE);
    this.sceneData = sceneData;
    this.buttonPressedSound = sceneData.createSound(Assets.BUTTON_PRESSED_SOUND_FILENAME);

    setBackground();
    initImageButtons();
    initNameSelection();
    initHostSelection();
    initLabel();
}
 
开发者ID:cpppwner,项目名称:NoRiskNoFun,代码行数:16,代码来源:JoinGameScene.java

示例8: InfoMenu

public InfoMenu(String labelText, boolean back) {
  super();
  text = new Label(labelText, new LabelStyle(Fonts.hud, Color.WHITE));
  text.setAlignment(Align.center, Align.center);
  stage.addActor(text);

  if (back) {
    button = MenuTools.getBackButton(this);
    stage.addActor(button);
  }
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:11,代码来源:InfoMenu.java

示例9: LobbyScene

public LobbyScene(SceneData sceneData) {
    super(SceneNames.LOBBY_SCENE, Color.WHITE);
    this.sceneData = sceneData;
    this.buttonPressedSound = sceneData.createSound(Assets.BUTTON_PRESSED_SOUND_FILENAME);

    setBackground();
    initLabel();
}
 
开发者ID:cpppwner,项目名称:NoRiskNoFun,代码行数:8,代码来源:LobbyScene.java

示例10: addtimerbuildroom

private void addtimerbuildroom(){
    grouptimerbuild = new Group();
    Image bg = new Image(new TextureRegion(manager.getAssetsRooms().getTexture(NameFiles.extensionImgBackground)));
    bg.setSize(Gdx.graphics.getWidth() / 2.75f, Gdx.graphics.getHeight() *0.32f);
    bg.setPosition(Gdx.graphics.getWidth() / 2 - bg.getWidth() / 2, Gdx.graphics.getHeight() / 5f);
    grouptimerbuild.addActor(bg);
    Label labelBuildingRoom = new Label("Building Room",new Label.LabelStyle(Font.getFont((int)(Gdx.graphics.getHeight()*0.025)), Color.WHITE));
    labelBuildingRoom.setPosition(Gdx.graphics.getWidth() / 2 - labelBuildingRoom.getWidth() / 2, Gdx.graphics.getHeight() / 2.2f);
    grouptimerbuild.addActor(labelBuildingRoom);
    labelprocent = new Label("0%",new Label.LabelStyle(new Label.LabelStyle(Font.getFont((int)(Gdx.graphics.getHeight()*0.03)),Color.WHITE)));
    labelprocent.setPosition(Gdx.graphics.getWidth() / 2 - labelprocent.getWidth() / 2, Gdx.graphics.getHeight() / 3.1f);
    grouptimerbuild.addActor(labelprocent);
    grouptimerbuild.setVisible(false);
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:14,代码来源:ScreenRooms.java

示例11: PlayState

public PlayState(GameStateManager gsm) {
        super(gsm);
        score = 0;
        chapa = new Chapa(50, 300);
        camera.setToOrtho(false, FlappyChapa.WIDTH / 2, FlappyChapa.HEIGHT / 2);
        Texture texture = new Texture("bg.png");
        backGround = new org.academiadecodigo.bootcamp.sprites.Background(camera);
        backGround.start();
        ground = new Texture("ground.png");
        /*table = new Table();
        table.setPosition(camera.position.x,camera.position.y);
        //table.setBounds(camera.position.x,camera.position.y,camera.viewportWidth,camera.viewportHeight/10);
        table.setFillParent(true);*/
        scoreLabel = new Label(String.format("%06d", score), new Label.LabelStyle(new BitmapFont(), Color.WHITE));
        scoreLabel.setPosition(camera.position.x,0);
        startTime = TimeUtils.nanoTime();
        anto = new Anto(camera);
//        groundPos1 = new Vector2(camera.position.x - camera.viewportWidth / 2, GROUND_Y_OFFSET);
//        groundPos2 = new Vector2((camera.position.x - camera.viewportWidth / 2) + ground.getWidth(), GROUND_Y_OFFSET);
        tubes = new Array<Tube>();
        for (int i = 0; i < TUBE_COUNT; i++) {
            tubes.add(new Tube(i * (TUBE_SPACING + Tube.TUBE_WIDTH)));
        }

        music = Gdx.audio.newMusic(Gdx.files.internal("bigSmoke_justAudio.mp3"));
        music.setLooping(true);
        music.setVolume(0.5f);
        music.play();
    }
 
开发者ID:RubenMateus,项目名称:FlappyChapa,代码行数:29,代码来源:PlayState.java

示例12: PlayScreen

public PlayScreen(NoObjectionGame game) {
    atlas = new TextureAtlas("dudestuff3.pack");

    this.game = game;
    bg = new Texture("main_background.png");
    gameCam = new OrthographicCamera();
    gamePort = new FitViewport(NoObjectionGame.V_WIDTH / NoObjectionGame.PPM, NoObjectionGame.V_HEIGHT / NoObjectionGame.PPM, gameCam);
    hud = new Hud(game.batch);

    maploader = new TmxMapLoader();
    map = maploader.load("map1.tmx");
    renderer = new OrthoCachedTiledMapRenderer(map, 1 / NoObjectionGame.PPM);
    gameCam.position.set(gamePort.getWorldWidth() / 2, gamePort.getWorldHeight() / 2, 0);

    world = new World(new Vector2(0, -10), true);
    b2dr = new Box2DDebugRenderer();

    new B2WorldCreator(world, map);
    hero = new Hero(world, this);
    controller = new Controller();
    worldContactListener = new WorldContactListener();
    world.setContactListener(worldContactListener);

    //timer
    sb = new SpriteBatch();
    viewport = new FitViewport(NoObjectionGame.V_WIDTH, NoObjectionGame.V_HEIGHT, new OrthographicCamera());
    stage = new Stage(viewport, sb);
    table = new Table();
    table.top();
    table.setFillParent(true);
    countDownLabel = new Label(Float.toString(playTime), new Label.LabelStyle(new BitmapFont(), Color.WHITE));
    table.add(countDownLabel).expandX();
    stage.addActor(table);


}
 
开发者ID:MissionBit,项目名称:summer17-android,代码行数:36,代码来源:PlayScreen.java

示例13: renderPause

/**
 * Stellt das Ingame Menü dar.
 *
 * @param camera Zugriff auf die Kamera
 * @param x erspart eine Neuberechnung der X Position des Menüs
 */
private void renderPause(OrthographicCamera camera, float x)
{
    batch.setProjectionMatrix(projection);
    batch.begin();

    float y = camera.viewportHeight - (camera.viewportHeight - HEIGHT) / 2f;

    y -= 45;

    fontLayout.setText(titleFont, localeBundle.get(deathMode ? "gestorben" : "menu"), Color.CORAL, WIDTH, Align.center, false);
    titleFont.draw(batch, fontLayout, x, y);

    y -= 125f;

    for (int i = 0; i < ENTRIES.length; i++)
    {
        Color entryColor = Color.WHITE;
        if (i == activeEntry)
        {
            entryColor = Color.YELLOW;
        }

        fontLayout.setText(textFont, localeBundle.get((i == 0 && deathMode) ? "neustart" : ENTRIES[i]), entryColor, WIDTH, Align.center, false);
        textFont.draw(batch, fontLayout, x, y);

        y -= 75f;
    }

    batch.end();
}
 
开发者ID:Entwicklerpages,项目名称:school-game,代码行数:36,代码来源:IngameMenu.java

示例14: 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;
    }
}
 
开发者ID:hogeschool,项目名称:INFSEN01-2,代码行数:15,代码来源:DefaultUpdateVisitor.java

示例15: 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;
    }
}
 
开发者ID:hogeschool,项目名称:INFSEN01-2,代码行数:15,代码来源:GDXDrawingAdapter.java


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