Exemplo n.º 1
0
        protected override void VerifyLocation(GridLocation oldLocation, GridLocation newLocation)
        {
            if (oldLocation.Grid == newLocation.Grid)
            {
                return;
            }

            BlockGrid  grid   = newLocation.Grid;
            GridDriver driver = grid.GetComponent <GridDriver>();

            if (!driver)
            {
                driver      = grid.gameObject.AddComponent <GridDriver>();
                driver.Grid = grid;
            }
            Driver = driver;
        }