Ejemplo n.º 1
0
    void Start()
    {
        _boat        = GameObject.FindWithTag("Player");
        _currentTile = new Vector3(0, 0, 0);
        _mapX        = 0;
        _mapZ        = 0;

        /*
         *      if (_size < 5) { _size = 5; }
         *
         *      if (_size % 2 == 0){ _split = (_size / 2) - 1;} //Is even
         *      else { _split = (_size / 2); } //Is odd
         */
        _islands = Resources.LoadAll <GameObject>("IslandPrefaps");

        _pieceX = _water.GetComponent <Renderer>().bounds.size.x;
        _pieceZ = _water.GetComponent <Renderer>().bounds.size.z;

        _islandTypes = _islands.Length;

        Map.LoadMap(_size);
        Map.RandomGenerateMap(_size, _islandTypes);
        DrawMap.DrawMapStart(_size, _water, _islands, _pieceX, _pieceZ, _objective);


        //Instantiate(_water, new Vector3(0, 0, 0), Quaternion.identity);
    }