public override void Update(float deltaTime) { base.Update(deltaTime); target = CollisionManager.CollidesWithEnemy(view); if (target != null) { laserGun.PointAt((int)target.X + target.Width / 2, (int)target.Y + target.Height / 2); laserGun.Shoot(); } laserGun.Update(deltaTime); }
public override void Update(float deltaTime) { base.Update(deltaTime); Enemy victim = CollisionManager.CollidesWithEnemy(this); if (victim != null) { if (!byTurret) { GameManager.landedHits++; } victim.InflictDamage(attackPower); Alive = false; } }