當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。