private void Awake() { selfPart = GetComponent <ParticleAcceleratorPart>(); registerTile = GetComponent <RegisterTile>(); electricalNodeControl = GetComponent <ElectricalNodeControl>(); damageData = DamageData.CreateInstance <DamageData>(); damageData.SetAttackType(AttackType.Rad); damageData.SetDamageType(DamageType.Clone); }
private void OnMachineBreak(ParticleAcceleratorPart brokenPart) { connected = false; status = "<color=red>Not Connected</color>"; foreach (var part in connectedParts) { part.OnShutDown.RemoveListener(OnMachineBreak); if (part == brokenPart) { continue; } part.ChangeState(ParticleAcceleratorState.Closed); } selfPart.ChangeState(ParticleAcceleratorState.Closed); connectedParts.Clear(); }