Exemplo n.º 1
0
        public override void Destroy()
        {
            if (HasSpeedField && BasicField.TestFieldClear(Position.get()))
            {
                HasSpeedField = false;
                SpeedBoostField s = new SpeedBoostField();
                ParentLevel.AddObject(s);
                s.Position.set(Position.get());
            }

            base.Destroy();
        }
        public override bool Trigger(PlayerShip p)
        {
            if (BasicField.TestFieldClear(p.Position.get()))
            {
                BasicField f = new SpeedBoostField();
                p.ParentLevel.AddObject(f);
                f.Position.set(p.Position.get());
                f.TargetSize *= 1.5f;
                return(true);
            }

            return(false);
        }
Exemplo n.º 3
0
        public override void Damage(float damage, float pushTime, Vector2 pushSpeed, BasicShipGameObject Damager, AttackType attackType)
        {
            if (attackType != AttackType.White && HasSpeedField && BasicField.TestFieldClear(Position.get()))
            {
                HasSpeedField = false;
                SpeedBoostField s = new SpeedBoostField();
                ParentLevel.AddObject(s);
                s.Position.set(Position.get());
            }

            if (attackType != Weakness && attackType != AttackType.Explosion && attackType != AttackType.Melee)
            {
                attackType = Resistence;
            }

            base.Damage(damage, pushTime, pushSpeed, Damager, attackType);
        }