Exemplo n.º 1
0
 public AbsData(Player d)
 {
     ChangePosition(d.GetPosition());
     ChangeWeapon(weapon);
     id             = d.id;
     alive          = true;
     boundingSphere = new BoundingSphere(this.GetPosition(), Constants.BOLLRADIE);
 }
Exemplo n.º 2
0
 public AbsData(Player d)
 {
     ChangePosition(d.GetPosition());
     ChangeWeapon(weapon);
     id = d.id;
     alive = true;
     boundingSphere = new BoundingSphere(this.GetPosition(), Constants.BOLLRADIE);
 }
Exemplo n.º 3
0
        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);
                }
            }
        }
Exemplo n.º 4
0
        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);
                }
            }
        }