Пример #1
0
 /// <inheritdoc />
 public bool MapExists(MapId mapID)
 {
     return(_maps.ContainsKey(mapID));
 }
Пример #2
0
 public void RaiseOnGridRemoved(MapId mapId, GridId gridId)
 {
     OnGridRemoved?.Invoke(mapId, gridId);
 }
Пример #3
0
 internal MapGrid(MapManager mapManager, GridId gridIndex, ushort chunkSize, float snapsize, MapId mapID)
 {
     _mapManager = mapManager;
     Index       = gridIndex;
     ChunkSize   = chunkSize;
     SnapSize    = snapsize;
     MapID       = mapID;
 }
Пример #4
0
 /// <inheritdoc />
 public IMap GetMap(MapId mapID)
 {
     return(_maps[mapID]);
 }
Пример #5
0
 public MapCoordinates(Vector2 position, MapId mapId)
 {
     Position = position;
     MapId    = mapId;
 }
Пример #6
0
 public MapCoordinates(float x, float y, MapId mapId) : this(new Vector2(x, y), mapId)
 {
 }
Пример #7
0
 public LocalCoordinates(float X, float Y, IMapGrid argGrid)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid.Index;
     MapID    = argGrid.MapID;
 }
Пример #8
0
 /// <inheritdoc />
 public IMap GetMap(MapId mapID)
 {
     return _maps[mapID];
 }
Пример #9
0
 public LocalCoordinates(Vector2 argPosition, IMapGrid argGrid)
 {
     Position = argPosition;
     GridID   = argGrid.Index;
     MapID    = argGrid.MapID;
 }
Пример #10
0
 public LocalCoordinates(Vector2 argPosition, GridId argGrid, MapId argMap)
 {
     Position = argPosition;
     GridID   = argGrid;
     MapID    = argMap;
 }
Пример #11
0
 public ScreenCoordinates(float X, float Y, MapId argMap)
 {
     Position = new Vector2(X, Y);
     MapID    = argMap;
 }
Пример #12
0
 public ScreenCoordinates(Vector2 argPosition, MapId argMap)
 {
     Position = argPosition;
     MapID    = argMap;
 }
Пример #13
0
 public Map(MapManager mapManager, MapId mapID)
 {
     Index       = mapID;
     _mapManager = mapManager;
     CreatedTick = _mapManager._gameTiming.CurTick;
 }
Пример #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;
 }
Пример #15
0
 public LocalCoordinates(float X, float Y, GridId argGrid, MapId argMap)
 {
     Position = new Vector2(X, Y);
     GridID   = argGrid;
     MapID    = argMap;
 }
Пример #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)
 {
 }
Пример #17
0
 public Map(MapManager mapManager, MapId mapID)
 {
     Index       = mapID;
     _mapManager = mapManager;
     CreateGrid(GridId.DefaultGrid);
 }