本文整理汇总了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);
}