コード例 #1
0
        private void Awake()
        {
            selfPart              = GetComponent <ParticleAcceleratorPart>();
            registerTile          = GetComponent <RegisterTile>();
            electricalNodeControl = GetComponent <ElectricalNodeControl>();

            damageData = DamageData.CreateInstance <DamageData>();
            damageData.SetAttackType(AttackType.Rad);
            damageData.SetDamageType(DamageType.Clone);
        }
コード例 #2
0
        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();
        }