List of usage examples for com.badlogic.gdx.graphics.g2d TextureAtlas findRegion
public AtlasRegion findRegion(String name)
From source file:ca.hiphiparray.amazingmaze.Assets.java
License:Open Source License
/** Helper method for loading the map resources. */ private void loadMapResources() { manager.load(GAME_ATLAS_LOCATION, TextureAtlas.class); manager.finishLoadingAsset(GAME_ATLAS_LOCATION); TextureAtlas atlas = manager.get(Assets.GAME_ATLAS_LOCATION, TextureAtlas.class); // Reference used for readability. tiles = new TiledMapTileSet(); StaticTiledMapTile background = new StaticTiledMapTile(atlas.findRegion(BACKGROUND)); StaticTiledMapTile barrier = new StaticTiledMapTile(atlas.findRegion(BARRIER)); StaticTiledMapTile placeholder = new StaticTiledMapTile(atlas.findRegion(PLACEHOLDER)); background.setId(TileIDs.computeID(TileIDs.BACKGROUND)); barrier.setId(TileIDs.computeID(TileIDs.BARRIER)); placeholder.setId(TileIDs.computeID(TileIDs.PLACEHOLDER)); tiles.putTile(background.getId(), background); tiles.putTile(barrier.getId(), barrier); tiles.putTile(placeholder.getId(), placeholder); StaticTiledMapTile verticalOn = new StaticTiledMapTile(atlas.findRegion(VERTICAL + ON_MODIFIER)); StaticTiledMapTile verticalOff = new StaticTiledMapTile(atlas.findRegion(VERTICAL + OFF_MODIFIER)); StaticTiledMapTile verticalUnknown = new StaticTiledMapTile(atlas.findRegion(VERTICAL + UNKNOWN_MODIFIER)); verticalOn.setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.VERTICAL, TileIDs.ON)); verticalOff.setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.VERTICAL, TileIDs.OFF)); verticalUnknown.setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.VERTICAL, TileIDs.UNKNOWN)); tiles.putTile(verticalOn.getId(), verticalOn); tiles.putTile(verticalOff.getId(), verticalOff); tiles.putTile(verticalUnknown.getId(), verticalUnknown); loadGates(atlas, ON_MODIFIER, UP_MODIFIER, TileIDs.ON, TileIDs.UP_GATE); loadGates(atlas, ON_MODIFIER, DOWN_MODIFIER, TileIDs.ON, TileIDs.DOWN_GATE); loadGates(atlas, OFF_MODIFIER, UP_MODIFIER, TileIDs.OFF, TileIDs.UP_GATE); loadGates(atlas, OFF_MODIFIER, DOWN_MODIFIER, TileIDs.OFF, TileIDs.DOWN_GATE); loadGates(atlas, UNKNOWN_MODIFIER, UP_MODIFIER, TileIDs.UNKNOWN, TileIDs.UP_GATE); loadGates(atlas, UNKNOWN_MODIFIER, DOWN_MODIFIER, TileIDs.UNKNOWN, TileIDs.DOWN_GATE); StaticTiledMapTile turnOnUpLeft = new StaticTiledMapTile( atlas.findRegion(TURN + ON_MODIFIER + UP_MODIFIER + LEFT_MODIFIER)); StaticTiledMapTile turnOffUpLeft = new StaticTiledMapTile( atlas.findRegion(TURN + OFF_MODIFIER + UP_MODIFIER + LEFT_MODIFIER)); StaticTiledMapTile turnOnUpRight = new StaticTiledMapTile( atlas.findRegion(TURN + ON_MODIFIER + UP_MODIFIER + RIGHT_MODIFIER)); StaticTiledMapTile turnOffUpRight = new StaticTiledMapTile( atlas.findRegion(TURN + OFF_MODIFIER + UP_MODIFIER + RIGHT_MODIFIER)); StaticTiledMapTile turnOnDownLeft = new StaticTiledMapTile( atlas.findRegion(TURN + ON_MODIFIER + DOWN_MODIFIER + LEFT_MODIFIER)); StaticTiledMapTile turnOffDownLeft = new StaticTiledMapTile( atlas.findRegion(TURN + OFF_MODIFIER + DOWN_MODIFIER + LEFT_MODIFIER)); StaticTiledMapTile turnOnDownRight = new StaticTiledMapTile( atlas.findRegion(TURN + ON_MODIFIER + DOWN_MODIFIER + RIGHT_MODIFIER)); StaticTiledMapTile turnOffDownRight = new StaticTiledMapTile( atlas.findRegion(TURN + OFF_MODIFIER + DOWN_MODIFIER + RIGHT_MODIFIER)); turnOnUpLeft.setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.TURN, TileIDs.ON, TileIDs.UP_LEFT)); turnOffUpLeft.setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.TURN, TileIDs.OFF, TileIDs.UP_LEFT)); turnOnUpRight.setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.TURN, TileIDs.ON, TileIDs.UP_RIGHT)); turnOffUpRight.setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.TURN, TileIDs.OFF, TileIDs.UP_RIGHT)); turnOnDownLeft.setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.TURN, TileIDs.ON, TileIDs.DOWN_LEFT)); turnOffDownLeft.setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.TURN, TileIDs.OFF, TileIDs.DOWN_LEFT)); turnOnDownRight.setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.TURN, TileIDs.ON, TileIDs.DOWN_RIGHT)); turnOffDownRight// w w w .ja va 2s . co m .setId(TileIDs.computeID(TileIDs.WIRE_RANGE, TileIDs.TURN, TileIDs.OFF, TileIDs.DOWN_RIGHT)); tiles.putTile(turnOnUpLeft.getId(), turnOnUpLeft); tiles.putTile(turnOffUpLeft.getId(), turnOffUpLeft); tiles.putTile(turnOnUpRight.getId(), turnOnUpRight); tiles.putTile(turnOffUpRight.getId(), turnOffUpRight); tiles.putTile(turnOnDownLeft.getId(), turnOnDownLeft); tiles.putTile(turnOffDownLeft.getId(), turnOffDownLeft); tiles.putTile(turnOnDownRight.getId(), turnOnDownRight); tiles.putTile(turnOffDownRight.getId(), turnOffDownRight); loadFish(atlas, BLUE_MODIFIER, TileIDs.BLUE); loadFish(atlas, PURPLE_MODIFIER, TileIDs.PURPLE); loadFish(atlas, GREEN_MODIFIER, TileIDs.GREEN); loadFish(atlas, RED_MODIFIER, TileIDs.RED); loadFish(atlas, ORANGE_MODIFIER, TileIDs.ORANGE); StaticTiledMapTile cheese = new StaticTiledMapTile(atlas.findRegion(CHEESE)); cheese.setId(TileIDs.computeID(TileIDs.POWERUP_RANGE, TileIDs.CHEESE)); tiles.putTile(cheese.getId(), cheese); }
From source file:ca.hiphiparray.amazingmaze.Assets.java
License:Open Source License
/** * Load the fish with the given parameters. * * @param atlas the {@link TextureAtlas} to load from. * @param colourName the name of the colour in the atlas. * @param colourID the ID of the colour in {@link TileIDs}. *//*from ww w .j av a 2 s .co m*/ private void loadFish(TextureAtlas atlas, String colourName, int colourID) { StaticTiledMapTile fish = new StaticTiledMapTile(atlas.findRegion(FISH + colourName)); fish.setId(TileIDs.computeID(TileIDs.POWERUP_RANGE, TileIDs.FISH, colourID)); tiles.putTile(fish.getId(), fish); }
From source file:ca.hiphiparray.amazingmaze.Assets.java
License:Open Source License
/** * Load all gates for the given parameters. * * @param atlas the {@link TextureAtlas} to load from. * @param electricStateName the name of the electrical state of the gates to load. * @param directionName the name of the direction of the gates to load. * @param electricID the ID of the electrical state of the gates to load. * @param directionID the directional ID of the gates to load. *///from www . ja v a 2 s.c o m private void loadGates(TextureAtlas atlas, String electricStateName, String directionName, int electricID, int directionID) { StaticTiledMapTile and = new StaticTiledMapTile( atlas.findRegion(AND_GATE + electricStateName + directionName)); StaticTiledMapTile nand = new StaticTiledMapTile( atlas.findRegion(NAND_GATE + electricStateName + directionName)); StaticTiledMapTile or = new StaticTiledMapTile( atlas.findRegion(OR_GATE + electricStateName + directionName)); StaticTiledMapTile nor = new StaticTiledMapTile( atlas.findRegion(NOR_GATE + electricStateName + directionName)); StaticTiledMapTile xor = new StaticTiledMapTile( atlas.findRegion(XOR_GATE + electricStateName + directionName)); and.setId(TileIDs.computeID(TileIDs.GATE_RANGE, TileIDs.AND_GATE, directionID, electricID)); nand.setId(TileIDs.computeID(TileIDs.GATE_RANGE, TileIDs.NAND_GATE, directionID, electricID)); or.setId(TileIDs.computeID(TileIDs.GATE_RANGE, TileIDs.OR_GATE, directionID, electricID)); nor.setId(TileIDs.computeID(TileIDs.GATE_RANGE, TileIDs.NOR_GATE, directionID, electricID)); xor.setId(TileIDs.computeID(TileIDs.GATE_RANGE, TileIDs.XOR_GATE, directionID, electricID)); tiles.putTile(and.getId(), and); tiles.putTile(nand.getId(), nand); tiles.putTile(or.getId(), or); tiles.putTile(nor.getId(), nor); tiles.putTile(xor.getId(), xor); }
From source file:ca.hiphiparray.amazingmaze.FishMiniGame.java
License:Open Source License
/** * Constructor for FishMiniGame./*from w w w . j a va 2 s. com*/ * * @param game the {@link AmazingMazeGame} instance that is managing this screen. * @param player the {@link Player} instance that completed the last level. */ public FishMiniGame(final AmazingMazeGame game, Player player) { this.game = game; this.player = player; fishNumber = new int[5]; fishNumber[0] = this.player.blueCollected; fishNumber[1] = this.player.purpleCollected; fishNumber[2] = this.player.greenCollected; fishNumber[3] = this.player.redCollected; fishNumber[4] = this.player.orangeCollected; answer = 0; for (int i = 0; i < fishNumber.length; i++) { answer += fishNumber[i] * fishValue[i]; } stage = new Stage(new ScreenViewport(), this.game.batch); menuTable = new Table(); fishTable = new Table(); canvas = new Canvas( new Pixmap(Gdx.graphics.getWidth(), Gdx.graphics.getHeight() + shift, Pixmap.Format.RGB565)); menuTable.setFillParent(true); menuTable.top(); fishTable.bottom(); fishTable.setFillParent(true); fishImage = new Image[5]; TextureAtlas atlas = this.game.assets.manager.get(Assets.GAME_ATLAS_LOCATION, TextureAtlas.class); fishImage[0] = new Image(atlas.findRegion(Assets.FISH + Assets.BLUE_MODIFIER)); fishImage[0].setScale(4f); fishImage[1] = new Image(atlas.findRegion(Assets.FISH + Assets.PURPLE_MODIFIER)); fishImage[1].setScale(4f); fishImage[2] = new Image(atlas.findRegion(Assets.FISH + Assets.GREEN_MODIFIER)); fishImage[2].setScale(4f); fishImage[3] = new Image(atlas.findRegion(Assets.FISH + Assets.RED_MODIFIER)); fishImage[3].setScale(4f); fishImage[4] = new Image(atlas.findRegion(Assets.FISH + Assets.ORANGE_MODIFIER)); fishImage[4].setScale(4f); pencilButton = new Button(new TextureRegionDrawable( new TextureRegion(this.game.assets.manager.get(Assets.PENCIL_BUTTON, Texture.class)))); pencilButton.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { if (pencilButton.isPressed()) { canvas.setColor(drawColor); } } }); eraserButton = new Button(new TextureRegionDrawable( new TextureRegion(this.game.assets.manager.get(Assets.ERASER_BUTTON, Texture.class)))); eraserButton.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { if (eraserButton.isPressed()) { canvas.setColor(clearColor); } } }); helpButton = new Button(new TextureRegionDrawable( new TextureRegion(this.game.assets.manager.get(Assets.HELP_BUTTON, Texture.class)))); helpButton.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { if (helpButton.isPressed()) { Label.LabelStyle labelStyle = new Label.LabelStyle( game.assets.getFont(Assets.MONO_REGULAR, Assets.SMALL_FONT_SIZE), Color.WHITE); final Dialog dialog = new Dialog("Help", game.assets.skin); final TextButton okButton = new TextButton("OK", game.assets.skin); dialog.getButtonTable().bottom(); Label label = new Label("Find the total value of fish that you retrieved!\n" + "Each colour corresponds to the colour of Canadian money.\n" + "The numbers correspond to each number of fish you got.\n\n" + "In case you forgot: blue is 5, purple is 10, green is 20, red is 50, and orange is 100.", labelStyle); label.setScale(.5f); label.setWrap(true); label.setAlignment(Align.center); dialog.add(label).width(500).pad(50); dialog.add(okButton).bottom(); okButton.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { if (okButton.isPressed()) { dialog.hide(); canvas.setColor(drawColor); } } }); dialog.key(Keys.ENTER, true); dialog.show(stage); } } }); checkButton = new Button(new TextureRegionDrawable( new TextureRegion(this.game.assets.manager.get(Assets.CHECK_BUTTON, Texture.class)))); checkButton.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { dialog(); } }); clearButton = new Button(new TextureRegionDrawable( new TextureRegion(this.game.assets.manager.get(Assets.CLEAR_BUTTON, Texture.class)))); clearButton.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { if (clearButton.isPressed()) { canvas.clear(); canvas.setColor(drawColor); } } }); answerField = new TextField("", game.assets.skin); answerField.setTextFieldListener(new TextFieldListener() { @Override public void keyTyped(TextField textField, char key) { if (key == (char) 13) { stage.unfocus(answerField); dialog(); } } }); stage.addActor(menuTable); stage.addActor(canvas); stage.addActor(fishTable); menuTable.clear(); fishTable.clear(); helpButton.right(); menuTable.background(new TextureRegionDrawable( new TextureRegion(this.game.assets.manager.get(Assets.MINI_BACKGROUND, Texture.class)))); menuTable.add(pencilButton).pad(10).size(64); menuTable.add(eraserButton).pad(10).size(64); menuTable.add(clearButton).pad(10).size(64); menuTable.add(helpButton).pad(10).size(64); menuTable.row(); Label.LabelStyle labelStyle = new Label.LabelStyle( game.assets.getFont(Assets.SANS_REGULAR, Assets.REGULAR_FONT_SIZE), Color.WHITE); for (int i = 0; i < 5; i++) { fishTable.add(fishImage[i]).bottom().left().padLeft(10); } fishTable.add(answerField).minWidth(150).padLeft(150); fishTable.add(checkButton).pad(10).size(64); fishTable.row(); for (int i = 0; i < 5; i++) { fishTable.add(new Label(fishNumber[i] + "", labelStyle)).pad(30).center(); } fishTable.row(); setupPauseMenu(); input = new InputMultiplexer(stage, this); input.addProcessor(pauseMenu); }
From source file:ca.hiphiparray.amazingmaze.HelpScreen.java
License:Open Source License
/** * Creates the help screen.//from w w w . j ava 2 s . c o m * * @param game The instance for the AmazingMazeGame used. */ public HelpScreen(final AmazingMazeGame game) { super(game, true); instruct = new Label( "Check the logic gates to find the state of each wire and make your way through the maze. Be careful to avoid\nany wires that are on, as that means that they are electrified!", game.assets.skin, Assets.HUD_STYLE); instruct.setAlignment(Align.center); clicks = new Label( "Mark the wires by clicking on the gates. Left click = on. Right click = off. Middle click = unknown.", game.assets.skin, Assets.HUD_STYLE); clicks.setAlignment(Align.center); super.hud = new Stage(new ScreenViewport(), game.batch); table = new Table(); table.top(); table.setFillParent(true); super.hud.addActor(table); table.add(instruct).top().pad(10); table.row(); table.add(clicks).pad(10); table.row(); table.add().expand(); table.row(); gates = new Label[] { new Label("AND Gate", game.assets.skin, Assets.HUD_STYLE), new Label("NAND Gate", game.assets.skin, Assets.HUD_STYLE), new Label("OR Gate", game.assets.skin, Assets.HUD_STYLE), new Label("NOR Gate", game.assets.skin, Assets.HUD_STYLE), new Label("XOR Gate", game.assets.skin, Assets.HUD_STYLE) }; TextureAtlas atlas = game.assets.manager.get(Assets.GAME_ATLAS_LOCATION, TextureAtlas.class); // Reference used for readability. gatePics = new Image[] { new Image(atlas.findRegion(Assets.AND_GATE + Assets.UNKNOWN_MODIFIER + Assets.UP_MODIFIER)), new Image(atlas.findRegion(Assets.NAND_GATE + Assets.UNKNOWN_MODIFIER + Assets.UP_MODIFIER)), new Image(atlas.findRegion(Assets.OR_GATE + Assets.UNKNOWN_MODIFIER + Assets.UP_MODIFIER)), new Image(atlas.findRegion(Assets.NOR_GATE + Assets.UNKNOWN_MODIFIER + Assets.UP_MODIFIER)), new Image(atlas.findRegion(Assets.XOR_GATE + Assets.UNKNOWN_MODIFIER + Assets.UP_MODIFIER)), }; truthTable = new Table(); truthTable.top().center(); table.add(truthTable).bottom().pad(10); truthTable.add(); for (int x = 0; x < gatePics.length; x++) { truthTable.add(gatePics[x]).size(gatePics[x].getWidth() * 2, gatePics[x].getHeight() * 2).pad(5); } truthTable.row(); truthTable.add(); for (int x = 0; x < gates.length; x++) { truthTable.add(gates[x]).pad(5); } truthTable.row(); truth = new Label[][] { { new Label("false and false", game.assets.skin, Assets.HUD_STYLE), new Label("off", game.assets.skin, Assets.HUD_STYLE), new Label("on", game.assets.skin, Assets.HUD_STYLE), new Label("off", game.assets.skin, Assets.HUD_STYLE), new Label("on", game.assets.skin, Assets.HUD_STYLE), new Label("off", game.assets.skin, Assets.HUD_STYLE) }, { new Label("true and false", game.assets.skin, Assets.HUD_STYLE), new Label("off", game.assets.skin, Assets.HUD_STYLE), new Label("on", game.assets.skin, Assets.HUD_STYLE), new Label("on", game.assets.skin, Assets.HUD_STYLE), new Label("off", game.assets.skin, Assets.HUD_STYLE), new Label("on", game.assets.skin, Assets.HUD_STYLE) }, { new Label("true and true", game.assets.skin, Assets.HUD_STYLE), new Label("on", game.assets.skin, Assets.HUD_STYLE), new Label("off", game.assets.skin, Assets.HUD_STYLE), new Label("on", game.assets.skin, Assets.HUD_STYLE), new Label("off", game.assets.skin, Assets.HUD_STYLE), new Label("off", game.assets.skin, Assets.HUD_STYLE) } }; for (int x = 0; x < truth.length; x++) { for (int y = 0; y < truth[x].length; y++) { truthTable.add(truth[x][y]).pad(5); } truthTable.row(); } }
From source file:com.ads.gps.plane.Assets.java
License:Apache License
private static void loadBmps(TextureAtlas atlas) { startBg = atlas.findRegion("startbg"); gameBg = atlas.findRegion("gamebg"); netBg = atlas.findRegion("netbg"); layerBg = atlas.findRegion("layerbg");//,? winBg = atlas.findRegion("winbg"); areaBg = atlas.findRegion("area"); flash120_0 = atlas.findRegion("flash120-0"); flash120_1 = atlas.findRegion("flash120-1"); flash120_2 = atlas.findRegion("flash120-2"); flash120_3 = atlas.findRegion("flash120-3"); flash240 = atlas.findRegion("flash240"); suspend = atlas.findRegion("suspend"); share = atlas.findRegion("share"); barShare = atlas.findRegion("barshare"); recommend = atlas.findRegion("recommend"); light = atlas.findRegion("light"); next = atlas.findRegion("next"); returnTr = atlas.findRegion("return"); about = atlas.findRegion("about"); help = atlas.findRegion("help"); reset = atlas.findRegion("reset"); refresh = atlas.findRegion("refresh"); gate = atlas.findRegion("gate"); music = atlas.findRegion("muisc"); sound = atlas.findRegion("sound"); continueTr = atlas.findRegion("continue"); star = atlas.findRegion("star"); star_null = atlas.findRegion("star_null"); forbid = atlas.findRegion("forbid"); lock = atlas.findRegion("lock"); playBtn = atlas.findRegion("playbtn"); levelPreBtn = atlas.findRegion("levelpre"); levelNextBtn = atlas.findRegion("levelnext"); gate_0star = atlas.findRegion("gate_0star"); gate_1star = atlas.findRegion("gate_1star"); gate_2star = atlas.findRegion("gate_2star"); gate_3star = atlas.findRegion("gate_3star"); gate_lock = atlas.findRegion("gate_lock"); }
From source file:com.ads.gps.plane.Assets.java
License:Apache License
private static void creteMagicCubes(TextureAtlas atlas) { planes = new TextureRegion[PLANE_NUM]; for (int i = 0; i < PLANE_NUM; i++) { String name = "plane" + i; planes[i] = atlas.findRegion(name); }/*from ww w . j av a2 s . co m*/ }
From source file:com.ads.gps.plane.Assets.java
License:Apache License
private static void createGateImages(TextureAtlas atlas) { gateBmpList = new ArrayList<TextureRegion>(); int gateTotal = LEVEL_MAX * LEVEL_GATE_MAX; for (int i = 1; i <= gateTotal; i++) { gateBmpList.add(atlas.findRegion(i + "")); }//w ww . j av a2 s . c om }
From source file:com.ads.jump.frogs.Assets.java
License:Apache License
private static void createGateImages(TextureAtlas atlas) { gateBmpList = new ArrayList<TextureRegion>(); for (int i = 1; i <= GATE_MAX; i++) { gateBmpList.add(atlas.findRegion(i + "")); }//from w w w.j av a 2 s .com }
From source file:com.ads.logic.color.Assets.java
License:Apache License
private static void loadBmps(TextureAtlas atlas) { gameBg = atlas.findRegion("gamebg"); theme = atlas.findRegion("theme"); layerBg = atlas.findRegion("layerbg");//,? winBg = atlas.findRegion("winbg"); dlgBg = atlas.findRegion("dlgbg"); areaBg = atlas.findRegion("area"); resultBg = atlas.findRegion("resultbg"); readme = atlas.findRegion("readme"); suspend = atlas.findRegion("suspend"); share = atlas.findRegion("share"); recommend = atlas.findRegion("recommend"); light = atlas.findRegion("light"); next = atlas.findRegion("next"); returnTr = atlas.findRegion("return"); help = atlas.findRegion("help"); refresh = atlas.findRegion("refresh"); gate = atlas.findRegion("gate"); setting = atlas.findRegion("setting"); music = atlas.findRegion("muisc"); sound = atlas.findRegion("sound"); continueTr = atlas.findRegion("continue"); about = atlas.findRegion("about"); buy = atlas.findRegion("buy"); star = atlas.findRegion("star"); star_null = atlas.findRegion("star_null"); forbid = atlas.findRegion("forbid"); lock = atlas.findRegion("lock"); exit = atlas.findRegion("exit"); playBtn = atlas.findRegion("playbtn"); playBtnDown = atlas.findRegion("playbtndown"); resetGameBtn = atlas.findRegion("resetgamebtn"); levelPreBtn = atlas.findRegion("levelpre"); levelNextBtn = atlas.findRegion("levelnext"); cannot = atlas.findRegion("cannot"); yy = atlas.findRegion("yy"); gate_0star = atlas.findRegion("gate_0star"); gate_1star = atlas.findRegion("gate_1star"); gate_2star = atlas.findRegion("gate_2star"); gate_3star = atlas.findRegion("gate_3star"); gate_lock = atlas.findRegion("gate_lock"); }