List of usage examples for com.google.gwt.maeglin89273.game.mengine.core MEngine getAssetManager
public static AssetManager getAssetManager()
From source file:com.google.gwt.maeglin89273.game.ashinyballonthecross.client.tutorial.component.StepBoard.java
public StepBoard(Point leftTopCorner, double centerX) { super(leftTopCorner, 200, 420); this.titleLabel = new GameLabel(new Point(centerX, 30), TextAlign.CENTER, TextBaseline.MIDDLE, null, ASBOTXConfigs.Color.GRAY, ASBOTXConfigs.getCGFont(32)); this.block = new SpriteBlock(0, 0, 200, 420, MEngine.getAssetManager().getSpriteSheet("images/tutorial_steps.png")); }
From source file:com.google.gwt.maeglin89273.game.ashinyballonthecross.client.tutorial.component.TasksList.java
public TasksList(double centerX, double screenHeight) { super(new Point(centerX, 0), WIDTH, 0); this.screenHeight = screenHeight; block = new SpriteBlock(0, 0, 255, 0, MEngine.getAssetManager().getSpriteSheet("images/tutorial_tasks.png")); }
From source file:com.google.gwt.maeglin89273.shared.test.volcanogame.component.Volcano.java
public Volcano(Spacial space, Point p) { super(p, 500, 150); this.space = space; this.image = MEngine.getAssetManager().getSpriteSheet("volcano.png"); BodyDef bodyDef = new BodyDef(); bodyDef.position.set(CoordinateConverter.coordPixelsToWorld(p)); PolygonShape shape = new PolygonShape(); Vec2[] vertices = { CoordinateConverter.vectorPixelsToWorld(new Vector(-250, 75)), CoordinateConverter.vectorPixelsToWorld(new Vector(250, 75)), CoordinateConverter.vectorPixelsToWorld(new Vector(CRATER_WIDTH / 2, -75)), CoordinateConverter.vectorPixelsToWorld(new Vector(-CRATER_WIDTH / 2, -75)), };/* www . j a v a 2 s . co m*/ body = space.getWorld().createBody(bodyDef); shape.set(vertices, vertices.length); aabb = CoordinateConverter.transformAABB(body.createFixture(shape, 0f).getAABB()); }
From source file:com.google.gwt.maeglin89273.shared.test.volcanogame.component.VolcanoWorld.java
public VolcanoWorld(int width, int height) { super(new Point(0, 0), width, height); this.background = MEngine.getAssetManager().getSpriteSheet("volcano_background.png"); this.clouds = MEngine.getAssetManager().getSpriteSheet("clouds.png"); world = new World(new Vec2(0, -10f), true); volcano = new Volcano(this, new Point(250, 425)); }