Beispiel #1
0
    private void Awake()
    {
        TileMaps.singleton = this;

        this.grid = this.GetComponent <Grid>();

        // Compute the combined origin and size from all of the map.
        foreach (Tilemap tm in new Tilemap[] { this.floorMap, this.objectMap, this.decalMap })
        {
            if (tm != null)
            {
                Vector3Int origin = tm.origin;
                Vector3Int size   = tm.size;

                if (tm.size.x > this.combinedSize.x)
                {
                    this.combinedSize.x = tm.size.x;
                }
                if (tm.size.y > this.combinedSize.y)
                {
                    this.combinedSize.y = tm.size.y;
                }

                if (tm.origin.x < this.combinedOrigin.x)
                {
                    this.combinedOrigin.x = tm.origin.x;
                }
                if (tm.origin.y < this.combinedOrigin.y)
                {
                    this.combinedOrigin.y = tm.origin.y;
                }
            }
        }
    }
Beispiel #2
0
	//Mathf.RoundToInt( (calcPoint.y / 10 ) * 10 + (calcPoint.x * 10)), new Vector3(calcPoint.x, 0f, calcPoint.y)


	void Awake()
	{
		_tileMaps = GetComponent<TileMaps> ();
		_hover = GameObject.FindGameObjectWithTag ("Hover");
	}
Beispiel #3
0
 public MapProject(string name)
 {
     this.name = name;
     tileMaps = new TileMaps();
 }
Beispiel #4
0
 public MapProject()
 {
     tileMaps = new TileMaps();
 }