Ejemplo n.º 1
0
 void OnEnable()
 {
     if (handler != null)
     {
         NavmeshClipper.AddEnableCallback(HandleOnEnableCallback, HandleOnDisableCallback);
         handler.graph.OnRecalculatedTiles += OnRecalculatedTiles;
     }
     forcedReloadRects.Clear();
 }
Ejemplo n.º 2
0
 // Token: 0x060026A6 RID: 9894 RVA: 0x001A8DE4 File Offset: 0x001A6FE4
 private void OnEnable()
 {
     if (this.handler != null)
     {
         NavmeshClipper.AddEnableCallback(new Action <NavmeshClipper>(this.HandleOnEnableCallback), new Action <NavmeshClipper>(this.HandleOnDisableCallback));
         NavmeshBase graph = this.handler.graph;
         graph.OnRecalculatedTiles = (Action <NavmeshTile[]>)Delegate.Combine(graph.OnRecalculatedTiles, new Action <NavmeshTile[]>(this.OnRecalculatedTiles));
     }
     this.forcedReloadRects.Clear();
 }
Ejemplo n.º 3
0
 // Token: 0x060026A5 RID: 9893 RVA: 0x001A8D18 File Offset: 0x001A6F18
 public void UseSpecifiedHandler(TileHandler newHandler)
 {
     if (!base.enabled)
     {
         throw new InvalidOperationException("TileHandlerHelper is disabled");
     }
     if (this.handler != null)
     {
         NavmeshClipper.RemoveEnableCallback(new Action <NavmeshClipper>(this.HandleOnEnableCallback), new Action <NavmeshClipper>(this.HandleOnDisableCallback));
         NavmeshBase graph = this.handler.graph;
         graph.OnRecalculatedTiles = (Action <NavmeshTile[]>)Delegate.Remove(graph.OnRecalculatedTiles, new Action <NavmeshTile[]>(this.OnRecalculatedTiles));
     }
     this.handler = newHandler;
     if (this.handler != null)
     {
         NavmeshClipper.AddEnableCallback(new Action <NavmeshClipper>(this.HandleOnEnableCallback), new Action <NavmeshClipper>(this.HandleOnDisableCallback));
         NavmeshBase graph2 = this.handler.graph;
         graph2.OnRecalculatedTiles = (Action <NavmeshTile[]>)Delegate.Combine(graph2.OnRecalculatedTiles, new Action <NavmeshTile[]>(this.OnRecalculatedTiles));
     }
 }
Ejemplo n.º 4
0
        /** Use the specified handler, will create one at start if not called */
        public void UseSpecifiedHandler(TileHandler newHandler)
        {
            if (!enabled)
            {
                throw new System.InvalidOperationException("TileHandlerHelper is disabled");
            }

            if (handler != null)
            {
                NavmeshClipper.RemoveEnableCallback(HandleOnEnableCallback, HandleOnDisableCallback);
                handler.graph.OnRecalculatedTiles -= OnRecalculatedTiles;
            }

            handler = newHandler;

            if (handler != null)
            {
                NavmeshClipper.AddEnableCallback(HandleOnEnableCallback, HandleOnDisableCallback);
                handler.graph.OnRecalculatedTiles += OnRecalculatedTiles;
            }
        }
Ejemplo n.º 5
0
 internal void OnEnable()
 {
     NavmeshClipper.AddEnableCallback(HandleOnEnableCallback, HandleOnDisableCallback);
 }