/// <summary> /// Initializes the lane /// </summary> public void Initialize(MapManager mapManager, float tileSize, int activeTileCount, int edgeTileCount, MapAssetPool mapAssetPool) { m_mapManager = mapManager; m_tileSize = tileSize; m_activeTileCount = activeTileCount; m_edgeTileCount = edgeTileCount; m_mapAssetPool = mapAssetPool; InitializeItems(); }
/// <summary> /// Create a new LaneSet /// </summary> /// <param name="mapManager">instance that holds map data</param> /// <param name="mapAssetPool">pool of map assets</param> /// <param name="startRowCoord">row coordinate of the first lane</param> /// <param name="onLaneCreated">called each time a lane is created</param> public LaneSet(MapManager mapManager, MapAssetPool mapAssetPool, int startRowCoord, OnLaneCreated onLaneCreated) { m_mapManager = mapManager; m_mapAssetPool = mapAssetPool; m_startRowCoord = startRowCoord; m_onLaneCreated = onLaneCreated; InitializeLaneCount(startRowCoord); }
/// <summary> /// Create a new RailroadLaneSet /// </summary> /// <param name="mapManager">instance that holds map data</param> /// <param name="mapAssetPool">pool of map assets</param> /// <param name="startRowCoord">row coordinate of the first lane</param> /// <param name="onLaneCreated">called each time a lane is created</param> public RailroadLaneSet(MapManager mapManager, MapAssetPool mapAssetPool, int startRowCoord, OnLaneCreated onLaneCreated) : base(mapManager, mapAssetPool, startRowCoord, onLaneCreated) { m_type = LaneSetType.Railroad; }
/// <summary> /// Create a new GrassLaneSet /// </summary> /// <param name="mapManager">instance that holds map data</param> /// <param name="mapAssetPool">pool of map assets</param> /// <param name="startRowCoord">row coordinate of the first lane</param> /// <param name="onLaneCreated">called each time a lane is created</param> public GrassLaneSet(MapManager mapManager, MapAssetPool mapAssetPool, int startRowCoord, OnLaneCreated onLaneCreated) : base(mapManager, mapAssetPool, startRowCoord, onLaneCreated) { m_type = LaneSetType.Grass; }
/// <summary> /// Create a new BeginningLaneSet /// </summary> /// <param name="mapManager">instance that holds map data</param> /// <param name="mapAssetPool">pool of map assets</param> /// <param name="startRowCoord">row coordinate of the first lane</param> /// <param name="onLaneCreated">called each time a lane is created</param> public BeginningLaneSet(MapManager mapManager, MapAssetPool mapAssetPool, int startRowCoord, OnLaneCreated onLaneCreated) : base(mapManager, mapAssetPool, startRowCoord, onLaneCreated) { m_type = LaneSetType.Beginning; }