public AbsData(Player d) { ChangePosition(d.GetPosition()); ChangeWeapon(weapon); id = d.id; alive = true; boundingSphere = new BoundingSphere(this.GetPosition(), Constants.BOLLRADIE); }
public void CheckHits(Player player, OtherPlayer[] players) { if (players[id] != null) { Vector3 shooterPos = players[id].GetPosition(); BoundingSphere b = new BoundingSphere(player.GetPosition(), Constants.BOLLRADIE); Ray r = new Ray(shooterPos, dir); if (r.Intersects(b) != null) { player.ChangeLifeStatus(false); } } }