public void HitTarget() { Active = false; Velocity.Y = 0; Acceleration.Y = 0; Explosion.Spawn(Position, Radius * 0.5f, 100); ExplodeSound.Play(); }
void CheckHit() { foreach (TankShot shot in RefGameLogic.RefPlayer.ShotsRef) { if (shot.Active) { if (SphereIntersect(shot)) { Active = false; Explosion.DefuseColor = new Vector3(0.713f, 0.149f, 0.286f); Explosion.Spawn(Position, 5, 30); shot.HitTarget(); RefGameLogic.AddToScore(100); } } } }
public void HitTarget() { Active = false; Explosion.Spawn(Position, Radius * 0.25f, 30); HitSound.Play(); }