Exemplo n.º 1
0
        /// <summary>
        /// Ensures that the object is properly initialized.
        /// </summary>
        private void EnsureInit()
        {
            if (!this)
            {
                return;
            }

            if (adjacencyMap == null)
            {
                adjacencyMap = new AdjacencyMap();
            }

            if (!filter)
            {
                filter = GetComponent <MeshFilter>();
            }

            PlacedTileObject placedTileObject = GetComponent <PlacedTileObject>();

            if (placedTileObject == null)
            {
                genericType  = TileObjectGenericType.None;
                specificType = TileObjectSpecificType.None;
            }
            else
            {
                genericType  = placedTileObject.GetGenericType();
                specificType = placedTileObject.GetSpecificType();
            }
        }
Exemplo n.º 2
0
 public AdjacencyData(TileObjectGenericType genericType, TileObjectSpecificType specificType, bool exists)
 {
     GenericType  = genericType;
     SpecificType = specificType;
     Exists       = exists;
 }