Exemple #1
0
 /// <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)
 {
 }
Exemple #2
0
 /// <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;
 }
Exemple #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;
 }
 public Map(MapManager mapManager, MapId mapID)
 {
     Index       = mapID;
     _mapManager = mapManager;
     CreatedTick = _mapManager._gameTiming.CurTick;
 }
 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;
 }
Exemple #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)
 {
 }