void OnEnable() { if (handler != null) { NavmeshClipper.AddEnableCallback(HandleOnEnableCallback, HandleOnDisableCallback); handler.graph.OnRecalculatedTiles += OnRecalculatedTiles; } forcedReloadRects.Clear(); }
// 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(); }
// 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)); } }
/** 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; } }
internal void OnEnable() { NavmeshClipper.AddEnableCallback(HandleOnEnableCallback, HandleOnDisableCallback); }