当前位置: 首页>>代码示例>>Java>>正文


Java TiledMap.getTileWidth方法代码示例

本文整理汇总了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");
}
 
开发者ID:IngSW-unipv,项目名称:Progetto-C,代码行数:28,代码来源:MazeModality.java

示例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;
}
 
开发者ID:Kalwador,项目名称:Java-2D-Game,代码行数:22,代码来源:Camera.java

示例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;

   }
 
开发者ID:NotSimon10,项目名称:Simon_4_journal,代码行数:42,代码来源:Camera.java


注:本文中的org.newdawn.slick.tiled.TiledMap.getTileWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。