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(); }
public override bool Trigger(PlayerShip p) { if (BasicField.TestFieldClear(p.Position.get())) { BasicField f = new CloakingField(); p.ParentLevel.AddObject(f); f.Position.set(p.Position.get()); f.TargetSize *= 1.5f; return(true); } return(false); }
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); }