本文整理匯總了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;
}
示例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);
}
示例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();
}
示例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);
}