Beispiel #1
0
 /// <inheritdoc />
 public bool MapExists(MapId mapID)
 {
     return(_maps.ContainsKey(mapID));
 }
Beispiel #2
0
 public void RaiseOnGridRemoved(MapId mapId, GridId gridId)
 {
     OnGridRemoved?.Invoke(mapId, gridId);
 }
Beispiel #3
0
 internal MapGrid(MapManager mapManager, GridId gridIndex, ushort chunkSize, float snapsize, MapId mapID)
 {
     _mapManager = mapManager;
     Index       = gridIndex;
     ChunkSize   = chunkSize;
     SnapSize    = snapsize;
     MapID       = mapID;
 }
Beispiel #4
0
 /// <inheritdoc />
 public IMap GetMap(MapId mapID)
 {
     return(_maps[mapID]);
 }
Beispiel #5
0
 public MapCoordinates(Vector2 position, MapId mapId)
 {
     Position = position;
     MapId    = mapId;
 }
Beispiel #6
0
 public MapCoordinates(float x, float y, MapId mapId) : this(new Vector2(x, y), mapId)
 {
 }
Beispiel #7
0
 public LocalCoordinates(float X, float Y, IMapGrid argGrid)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid.Index;
     MapID    = argGrid.MapID;
 }
 /// <inheritdoc />
 public IMap GetMap(MapId mapID)
 {
     return _maps[mapID];
 }
Beispiel #9
0
 public LocalCoordinates(Vector2 argPosition, IMapGrid argGrid)
 {
     Position = argPosition;
     GridID   = argGrid.Index;
     MapID    = argGrid.MapID;
 }
Beispiel #10
0
 public LocalCoordinates(Vector2 argPosition, GridId argGrid, MapId argMap)
 {
     Position = argPosition;
     GridID   = argGrid;
     MapID    = argMap;
 }
Beispiel #11
0
 public ScreenCoordinates(float X, float Y, MapId argMap)
 {
     Position = new Vector2(X, Y);
     MapID    = argMap;
 }
Beispiel #12
0
 public ScreenCoordinates(Vector2 argPosition, MapId argMap)
 {
     Position = argPosition;
     MapID    = argMap;
 }
Beispiel #13
0
 public Map(MapManager mapManager, MapId mapID)
 {
     Index       = mapID;
     _mapManager = mapManager;
     CreatedTick = _mapManager._gameTiming.CurTick;
 }
Beispiel #14
0
 internal MapGrid(MapManager mapManager, GridId gridIndex, ushort chunkSize, float snapsize, MapId mapID)
 {
     _mapManager      = mapManager;
     Index            = gridIndex;
     ChunkSize        = chunkSize;
     SnapSize         = snapsize;
     MapID            = mapID;
     LastModifiedTick = CreatedTick = _mapManager._gameTiming.CurTick;
 }
Beispiel #15
0
 public LocalCoordinates(float X, float Y, GridId argGrid, MapId argMap)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid;
     MapID    = argMap;
 }
Beispiel #16
0
 /// <summary>
 ///     Construct new grid local coordinates relative to the default grid of a map.
 /// </summary>
 public GridLocalCoordinates(float X, float Y, MapId argMap) : this(new Vector2(X, Y), argMap)
 {
 }
Beispiel #17
0
 public Map(MapManager mapManager, MapId mapID)
 {
     Index       = mapID;
     _mapManager = mapManager;
     CreateGrid(GridId.DefaultGrid);
 }