當前位置: 首頁>>代碼示例>>Java>>正文


Java Color.SKY屬性代碼示例

本文整理匯總了Java中com.badlogic.gdx.graphics.Color.SKY屬性的典型用法代碼示例。如果您正苦於以下問題:Java Color.SKY屬性的具體用法?Java Color.SKY怎麽用?Java Color.SKY使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在com.badlogic.gdx.graphics.Color的用法示例。


在下文中一共展示了Color.SKY屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: invoke

public CalculateColorText invoke() {
    color = Color.CHARTREUSE;
    text = "A";
    switch (rand) {
        case 0:
            color = Color.CHARTREUSE;
            text = "A";
            break;
        case 1:
            color = Color.CORAL;
            text = "E";
            break;
        case 2:
            color = Color.ORANGE;
            text = "I";
            break;
        case 3:
            color = Color.SKY;
            text = "O";
            break;
        case 4:
            color = Color.LIME;
            text = "U";
            break;
    }
    return this;
}
 
開發者ID:luarca84,項目名稱:Caramelos,代碼行數:27,代碼來源:CaramelosScreen.java

示例2: getSkyColour

public Color getSkyColour() {
	float light = getWorldSunlight();
	if (light <= 0.3f)
		return Color.BLACK;
	if (light >= 0.7f)
		return Color.SKY;
	return Color.BLACK.cpy().lerp(Color.SKY, (light - 0.3f) * 2.5f);
}
 
開發者ID:RedTroop,項目名稱:Cubes_2,代碼行數:8,代碼來源:WorldClient.java

示例3: drawShield

void drawShield(){
	if(control.shieldGroup.amount() == 0 && shieldDraws.size == 0) return;
	
	Graphics.surface(Vars.renderer.shieldSurface, false);
	Draw.color(Color.ROYAL);
	Entities.draw(control.shieldGroup);
	for(Callable c : shieldDraws){
		c.run();
	}
	Draw.reset();
	Graphics.surface();
	
	for(int i = 0; i < shieldHits.size / 3; i++){
		float time = shieldHits.get(i * 3 + 2);

		time += Timers.delta() / shieldHitDuration;
		shieldHits.set(i * 3 + 2, time);

		if(time >= 1f){
			shieldHits.removeRange(i * 3, i * 3 + 2);
			i--;
		}
	}

	Texture texture = shieldSurface.texture();
	Shaders.shield.color.set(Color.SKY);

	Tmp.tr2.setRegion(texture);
	Shaders.shield.region = Tmp.tr2;
	Shaders.shield.hits = shieldHits;
	
	if(Shaders.shield.isFallback){
		Draw.color(1f, 1f, 1f, 0.3f);
		Shaders.outline.color = Color.SKY;
		Shaders.outline.region = Tmp.tr2;
	}

	Graphics.end();
	Graphics.shader(Shaders.shield.isFallback ? Shaders.outline : Shaders.shield);
	Graphics.setScreen();

	Core.batch.draw(texture, 0, Gdx.graphics.getHeight(), Gdx.graphics.getWidth(), -Gdx.graphics.getHeight());

	Graphics.shader();
	Graphics.end();
	Graphics.beginCam();
	
	Draw.color();
	shieldDraws.clear();
}
 
開發者ID:Anuken,項目名稱:Mindustry,代碼行數:50,代碼來源:Renderer.java

示例4: getSkyColour

public Color getSkyColour() {
  float light = getWorldSunlight();
  if (light <= 0.3f) return Color.BLACK;
  if (light >= 0.7f) return Color.SKY;
  return Color.BLACK.cpy().lerp(Color.SKY, (light - 0.3f) * 2.5f);
}
 
開發者ID:RedTroop,項目名稱:Cubes,代碼行數:6,代碼來源:WorldClient.java


注:本文中的com.badlogic.gdx.graphics.Color.SKY屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。