本文整理汇总了Java中org.newdawn.slick.tiled.TiledMap.getTileWidth方法的典型用法代码示例。如果您正苦于以下问题:Java TiledMap.getTileWidth方法的具体用法?Java TiledMap.getTileWidth怎么用?Java TiledMap.getTileWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.newdawn.slick.tiled.TiledMap
的用法示例。
在下文中一共展示了TiledMap.getTileWidth方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MazeModality
import org.newdawn.slick.tiled.TiledMap; //导入方法依赖的package包/类
/**
* @param mazeMap
* @param mazeView
* @throws SlickException
*/
public MazeModality(TiledMap mazeMap,MazeView mazeView) throws SlickException {
this.addObserver(mazeView);
tileWidth = mazeMap.getTileWidth();
tileHeight = mazeMap.getTileHeight();
mazeWidth = mazeMap.getWidth();
mazeHeight = mazeMap.getHeight();
initializationTiles(mazeView);
pacman = new PacMan(tileWidth, tileHeight, mazeWidth, tiles);
clyde = new Clyde(tileWidth, tileHeight, mazeWidth, tiles);
blinky = new Blinky(tileWidth, tileHeight, mazeWidth, tiles);
inky = new Inky(tileWidth, tileHeight, mazeWidth, tiles);
pinky = new Pinky(tileWidth, tileHeight, mazeWidth, tiles);
eatGhost = new Sound("data/pacmanSound/eatGhost.wav");
death = new Sound("data/pacmanSound/death.wav");
eatSuperPill = new Sound("data/pacmanSound/eatSuperPill.wav");
}
示例2: Camera
import org.newdawn.slick.tiled.TiledMap; //导入方法依赖的package包/类
/**
* Create a new camera
*
* @param gc the GameContainer, used for getting the size of the GameCanvas
* @param map the TiledMap used for the current scene
*/
public Camera(GameContainer gc, TiledMap map) {
this.map = map;
this.numTilesX = map.getWidth();
this.numTilesY = map.getHeight();
this.tileWidth = map.getTileWidth();
this.tileHeight = map.getTileHeight();
this.mapHeight = this.numTilesX * this.tileWidth;
this.mapWidth = this.numTilesY * this.tileHeight;
this.gc = gc;
}
示例3: Camera
import org.newdawn.slick.tiled.TiledMap; //导入方法依赖的package包/类
/**
* Create a new camera
*
* @param gc the GameContainer, used for getting the size of the
GameCanvas
* @param map the TiledMap used for the current scene
*/
public Camera(GameContainer gc, TiledMap map) {
this.map = map;
this.numTilesX = map.getWidth();
this.numTilesY = map.getHeight();
this.tileWidth = map.getTileWidth();
this.tileHeight = map.getTileHeight();
this.mapHeight = this.numTilesX * this.tileWidth;
this.mapWidth = this.numTilesY * this.tileHeight;
this.gc = gc;
}