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