public override void StateChanged(IBlockStateChange change) { base.StateChanged(change); if (change.InitiatedOrInitiatedInUnrepairedState_OnlyCalledOnce) { GetConstructableOrSubConstructable().iBlocksWithText.BlocksWithText.Add(this); } else if (change.IsPerminentlyRemovedOrConstructDestroyed) { GetConstructableOrSubConstructable().iBlocksWithText.BlocksWithText.Remove(this); } }
public override void StateChanged(IBlockStateChange change) { if (change.InitiatedOrInitiatedInUnrepairedState_OnlyCalledOnce) { BlockWithText = true; PLYDataStorageBlockList.Add(this); } else if (change.IsPerminentlyRemovedOrConstructDestroyed) { PLYDataStorageBlockList.Remove(this); } base.StateChanged(change); }
public override void StateChanged(IBlockStateChange change) { base.StateChanged(change); if (change.InitiatedOrInitiatedInUnrepairedState_OnlyCalledOnce) { GetConstructableOrSubConstructable().iBlocksWithText.BlocksWithText.Add(this); MainConstruct.SchedulerRestricted.RegisterForFixedUpdate(new Action <ITimeStep>(FixedStep)); } if (change.IsPermanentlyRemovedOrConstructDestroyed) { GetConstructableOrSubConstructable().iBlocksWithText.BlocksWithText.Remove(this); MainConstruct.SchedulerRestricted.UnregisterForFixedUpdate(new Action <ITimeStep>(FixedStep)); } }
public override void StateChanged(IBlockStateChange change) { base.StateChanged(change); if (BlockWithText) { if (change.InitiatedOrInitiatedInUnrepairedState_OnlyCalledOnce) { StartTime = Time.frameCount; UniqueId = MainConstruct.UniqueIdsRestricted.CheckOutANewUniqueId(); GetConstructableOrSubConstructable().iBlocksWithText.BlocksWithText.Add(this); } else if (change.IsPerminentlyRemovedOrConstructDestroyed) { GetConstructableOrSubConstructable().iBlocksWithText.BlocksWithText.Remove(this); } } }