Esempio n. 1
0
 ///<summary>
 ///Send a message to everyone in the room except the target, then send
 ///a customized message to the target.
 ///</summary>
 ///<param name="pWriter">The target of the message, the person who's writing the action.</param>
 ///<param name="everyone">The message that should go to everyone in the room, except the pWriter</param>
 ///<param name="you">The message for just the pWriter.</param>
 public void WriteAll(Player pWriter, string everyone, string you)
 {
     foreach(Thing t in containedList)
     {
     if(t is Player)
     {
         Player p = (Player)t;
         if(p.PlayerState == PlayerStates.Playing)
         {
             if(p == pWriter)
             {
                 p.OutBuffer.Append(you);
             }
             else
             {
                 p.OutBuffer.Append(everyone);
             }
         }
     }
     }//end foreach
 }
Esempio n. 2
0
 ///<summary>
 ///This is how the command is actually executed.
 ///</summary>
 ///<param name="p">The player who is executing the command</param>
 ///<param name="cp">The CommandParser object for the command arguments sent.</param>
 public abstract void doCommand(Player p, CommandParser cp);
Esempio n. 3
0
 public Object FindObject(Player p, string name)
 {
     foreach(Thing t in containedList)
     {
     if(t.Name.ToLower() == name.ToLower())
     {
         if(t is Object)
             return (Object)t;
     }
     }
     return null;
 }