示例#1
0
        public override void Destroy()
        {
            if (HasCloakField && BasicField.TestFieldClear(Position.get()))
            {
                HasCloakField = false;
                CloakingField c = new CloakingField();
                ParentLevel.AddObject(c);
                c.SetPosition(Position.get());
            }

            base.Destroy();
        }
示例#2
0
        public override void Damage(float damage, float pushTime, Vector2 pushSpeed, BasicShipGameObject Damager, AttackType attackType)
        {
            if (attackType != AttackType.White && HasCloakField && BasicField.TestFieldClear(Position.get()))
            {
                HasCloakField = false;
                CloakingField c = new CloakingField();
                ParentLevel.AddObject(c);
                c.SetPosition(Position.get());
            }

            if (attackType != AttackType.White)
            {
                damage /= 2f;
            }
            base.Damage(damage, pushTime, pushSpeed, Damager, attackType);
        }