コード例 #1
0
ファイル: TileSheet.cs プロジェクト: wang1986one/tIDE
 /// <summary>
 /// Constructs a TileSheet for the given map, image source, sheet size
 /// and tile size. An GUID-based ID is automatically assigned to the
 /// sheet
 /// </summary>
 /// <param name="map">Map associated with the tile sheet</param>
 /// <param name="imageSource">Reference to an image source</param>
 /// <param name="sheetSize">Size of the sheet in tiles</param>
 /// <param name="tileSize">Size of the tiles in pixels</param>
 public TileSheet(Map map, string imageSource, Size sheetSize, Size tileSize)
 {
     m_map         = map;
     m_imageSource = imageSource;
     m_sheetSize   = sheetSize;
     m_tileSize    = tileSize;
     m_margin      = m_spacing = Size.Zero;
     m_tileIndexPropertyAccessor = new TileIndexPropertyAccessor(this);
 }
コード例 #2
0
ファイル: TileSheet.cs プロジェクト: dekk7/xEngine
 /// <summary>
 /// Constructs a TileSheet for the given map, image source, sheet size
 /// and tile size. An GUID-based ID is automatically assigned to the
 /// sheet
 /// </summary>
 /// <param name="map">Map associated with the tile sheet</param>
 /// <param name="imageSource">Reference to an image source</param>
 /// <param name="sheetSize">Size of the sheet in tiles</param>
 /// <param name="tileSize">Size of the tiles in pixels</param>
 public TileSheet(Map map, string imageSource, Size sheetSize, Size tileSize)
 {
     m_map = map;
     m_imageSource = imageSource;
     m_sheetSize = sheetSize;
     m_tileSize = tileSize;
     m_margin = m_spacing = Size.Zero;
     m_tileIndexPropertyAccessor = new TileIndexPropertyAccessor(this);
 }