Пример #1
0
    public void Awake()
    {
        tileMap = new TileMap();

        _renderer                = GetComponent <TileMapRenderer>();
        _aStarControllerTile     = GetComponent <MinimapController_Tile>();
        _aStarControllerWaypoint = GetComponent <MinimapController_Waypoint>();

        _startPointGO = GameObject.Instantiate(startPointPrefab);
        _startPointGO.transform.SetParent(transform);
        _endPointGO = GameObject.Instantiate(endPointPrefab);
        _endPointGO.transform.SetParent(transform);

        _guiState = GUIState.Normal;
        _worldRep = WorldRepresenation.Tile;
    }
Пример #2
0
    public void SetWorldRep(int type)
    {
        switch (type)
        {
        case 0:
            _worldRep = WorldRepresenation.Tile;
            break;

        case 1:
            _worldRep = WorldRepresenation.Waypoint;
            break;

        default:
            break;
        }

        _aStarControllerTile.Clear();
        _aStarControllerWaypoint.Clear();
    }