コード例 #1
0
ファイル: Coordinates.cs プロジェクト: yyzl123/RobustToolbox
 /// <summary>
 ///     Constructs a new instance of <c>MapCoordinates</c>.
 /// </summary>
 /// <param name="x">World position coordinate on the X axis.</param>
 /// <param name="y">World position coordinate on the Y axis.</param>
 /// <param name="mapId">Map identifier relevant to this position.</param>
 public MapCoordinates(float x, float y, MapId mapId)
     : this(new Vector2(x, y), mapId)
 {
 }
コード例 #2
0
ファイル: Coordinates.cs プロジェクト: yyzl123/RobustToolbox
 /// <summary>
 ///     Constructs a new instance of <c>MapCoordinates</c>.
 /// </summary>
 /// <param name="position">World position coordinates.</param>
 /// <param name="mapId">Map identifier relevant to this position.</param>
 public MapCoordinates(Vector2 position, MapId mapId)
 {
     Position = position;
     MapId    = mapId;
 }
コード例 #3
0
 /// <summary>
 /// Used to deconstruct this object into a tuple.
 /// </summary>
 /// <param name="mapId">Map identifier relevant to this position.</param>
 /// <param name="x">World position coordinate on the X axis.</param>
 /// <param name="y">World position coordinate on the Y axis.</param>
 public void Deconstruct(out MapId mapId, out float x, out float y)
 {
     mapId = MapId;
     x     = X;
     y     = Y;
 }
コード例 #4
0
 public Map(MapManager mapManager, MapId mapID)
 {
     Index       = mapID;
     _mapManager = mapManager;
     CreatedTick = _mapManager._gameTiming.CurTick;
 }
コード例 #5
0
 internal FindGridsEnumerator(IEntityManager entityManager, Dictionary <GridId, MapGrid> .Enumerator enumerator, MapId mapId, Box2 worldAABB, bool approx)
 {
     _entityManager = entityManager;
     _enumerator    = enumerator;
     _mapId         = mapId;
     _worldAABB     = worldAABB;
     _approx        = approx;
 }
コード例 #6
0
 /// <summary>
 ///     Constructs a new instance of TileRef.
 /// </summary>
 /// <param name="mapId">Identifier of the map this tile belongs to.</param>
 /// <param name="gridId">Identifier of the grid this tile belongs to.</param>
 /// <param name="xIndex">Positional X index of this tile on the grid.</param>
 /// <param name="yIndex">Positional Y index of this tile on the grid.</param>
 /// <param name="tile">Actual data of this tile.</param>
 internal TileRef(MapId mapId, GridId gridId, int xIndex, int yIndex, Tile tile)
     : this(mapId, gridId, new MapIndices(xIndex, yIndex), tile)
 {
 }