本文整理匯總了Java中com.badlogic.gdx.graphics.Color.CYAN屬性的典型用法代碼示例。如果您正苦於以下問題:Java Color.CYAN屬性的具體用法?Java Color.CYAN怎麽用?Java Color.CYAN使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.badlogic.gdx.graphics.Color
的用法示例。
在下文中一共展示了Color.CYAN屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testRemovedPixmapField
public void testRemovedPixmapField(){
GraphHeader.currentReadWriteVersion = 0;
TestClass object = new TestClass();
object.someInt = randInt();
object.someFloat = randFloat();
object.point = new GridPoint2(randInt(), randInt());
object.color = new Color(Color.CYAN);
object.smallTestClass = new SmallTestClass();
object.smallTestClass.someValue = randInt();
Pixmap pixmap = new Pixmap(20, 24, Pixmap.Format.RGBA8888);
for (int i = 0; i < pixmap.getWidth(); i++) {
for (int j = 0; j < pixmap.getHeight(); j++) {
pixmap.drawPixel(i, j, randInt());
}
}
object.smallTestClass.somePixmap = pixmap;
kryo.register(SmallTestClass.class);
kryo.register(TestClass.class);
GraphHeader<TestClass> graphHeader = new GraphHeader<TestClass>();
graphHeader.data = object;
GraphHeader.currentReadWriteVersion = 0;
byte[] written = write(graphHeader);
GraphHeader.currentReadWriteVersion = 1;
GraphHeader<TestClass> returned = read(written, GraphHeader.class);
assertTrue(equals(graphHeader, returned));
assertTrue(returned.data.smallTestClass.somePixmap == null);
}
示例2: PlayScreen
public PlayScreen(DarkDay game, SpriteBatch sb) {
this.game = game;
this.spriteBatch = sb;
gamecam = new OrthographicCamera();
stage = new Stage();
Gdx.input.setInputProcessor(stage);
conf = new ConfFacade();
conf.initConfs(208, 400, 32, 10);
touchpad = conf.getTouchPad();
stage.addActor(touchpad);
viewport = new ScreenViewport(gamecam);
debugRenderer = new Box2DDebugRenderer();
world = new World(new Vector2(0, 0f), true);
builder = new BodyDirector(new DynamicBodyBuilder(world,viewport.getCamera().viewportWidth / 2 + 3, viewport.getCamera().viewportHeight /2 + 3, 32f , 32f, 1.0f, false ));
builder.setBuilder();
entity = new B2dSteeringEntity(builder.getBody(), 10);
builder = new BodyDirector(new DynamicBodyBuilder(world, viewport.getCamera().viewportWidth / 2, viewport.getCamera().viewportHeight /2, 32f , 32f, 1.0f, true));
builder.setBuilder();
player = new Player(builder.getBody(), viewport ,touchpad);
target = new B2dSteeringEntity(builder.getBody(), 10);
rayHandler = new RayHandler(world);
rayHandler.setAmbientLight(.2f);
rayHandler.setShadows(true);
rayHandler.setBlurNum(1);
ptLight = new PointLight(rayHandler, 150, Color.CYAN, 6, 0, 0);
ptLight.attachToBody(builder.getBody());
ptLight.setSoftnessLength(0f);
for (int i = 0; i < 800; i++){
builder = new BodyDirector(new StaticBodyBuilder(world, (float) Math.random() * 100, (float) Math.random() * 100, (float) Math.random() * 50, 128f, 1.0f, true));
builder.setBuilder();
}
Arrive<Vector2> arriveSB = new Arrive<Vector2>(entity, target)
.setTimeToTarget(0.01f)
.setArrivalTolerance(2f)
.setDecelerationRadius(10);
entity.setBehavior(arriveSB);
}