예제 #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);
 }