Exemplo n.º 1
0
        public static bool AtZone(WorldZone zone, uLink.NetworkPlayer netPlayer)
        {
            PlayerClient client;

            if (!PlayerClient.Find(netPlayer, out client))
            {
                return(false);
            }
            return(AtZone(zone, client.lastKnownPosition));
        }
Exemplo n.º 2
0
        public static WorldZone Get(uLink.NetworkPlayer netPlayer)
        {
            PlayerClient client;

            if (!PlayerClient.Find(netPlayer, out client))
            {
                return(null);
            }
            return(Get(client.lastKnownPosition));
        }
Exemplo n.º 3
0
 public static bool Find(uLink.NetworkPlayer player, out PlayerClient pc, bool throwIfNotFound)
 {
     if (!throwIfNotFound)
     {
         return(PlayerClient.Find(player, out pc));
     }
     if (!PlayerClient.Find(player, out pc))
     {
         throw new ArgumentException("There was no PlayerClient for that player", "player");
     }
     return(true);
 }
Exemplo n.º 4
0
        public static WorldZone Get(uLink.NetworkPlayer netPlayer)
        {
            PlayerClient playerClient;
            WorldZone    result;

            if (!PlayerClient.Find(netPlayer, out playerClient))
            {
                result = null;
            }
            else
            {
                result = Zones.Get(playerClient.lastKnownPosition);
            }
            return(result);
        }
Exemplo n.º 5
0
 public virtual string ContextText(Controllable localControllable)
 {
     if (this._currentlyUsingPlayer == uLink.NetworkPlayer.unassigned)
     {
         return("Search");
     }
     if (this.occupierText == null)
     {
         PlayerClient client;
         if (!PlayerClient.Find(this._currentlyUsingPlayer, out client))
         {
             this.occupierText = "Occupied";
         }
         else
         {
             this.occupierText = string.Format("Occupied by {0}", client.userName);
         }
     }
     return(this.occupierText);
 }
Exemplo n.º 6
0
        public static bool AtZone(WorldZone zone, uLink.NetworkPlayer netPlayer)
        {
            PlayerClient playerClient;

            return(PlayerClient.Find(netPlayer, out playerClient) && Zones.AtZone(zone, playerClient.lastKnownPosition));
        }