//void OnInputPort2ConduitConnectionChanged(object data) //{ // this.Trigger(-2094018600, this.IsInputPort2Connected); //} protected override void OnCleanUp() { InputPort2ConduitFlow.RemoveConduitUpdater(this.InputPort2ConduitUpdate); //GameScenePartitioner.Instance.Free(ref this.InputPort2CellPartitionerEntry); InputPort2NetworkMgr.RemoveFromNetworks(this.InputPort2Cell, InputPort2NetworkItem, true); base.OnCleanUp(); }
protected override void OnSpawn() { base.OnSpawn(); InputPort2NetworkItem = new FlowUtilityNetwork.NetworkItem(InputPort2ConduitType, Endpoint.Sink, this.InputPort2Cell, this.gameObject); InputPort2NetworkMgr.AddToNetworks(this.InputPort2Cell, InputPort2NetworkItem, true); //this.InputPort2CellPartitionerEntry = GameScenePartitioner.Instance.Add("HighInflowLiquidReservoirProcess.OnSpawn", this, InputPort2Cell // , GameScenePartitioner.Instance.objectLayers[this.InputPort2ConduitType != ConduitType.Gas ? 16 : 12], new System.Action<object>(this.OnInputPort2ConduitConnectionChanged)); this.InputPort2ConduitFlow.AddConduitUpdater(this.InputPort2ConduitUpdate, ConduitFlowPriority.Default); //this.OnInputPort2ConduitConnectionChanged(null); }