Ejemplo n.º 1
0
        public CommandGamerJoined(int internalIndex, bool isHost, bool isLocal)
        {
            gamerInternalIndex = internalIndex;

            if (isHost)
                states = states | GamerStates.Host;
            if (isLocal)
                states = states | GamerStates.Local;
        }
Ejemplo n.º 2
0
 public CommandGamerJoined(int internalIndex, bool isHost, bool isLocal)
 {
   this.gamerInternalIndex = internalIndex;
   if (isHost)
     this.states = this.states | GamerStates.Host;
   if (!isLocal)
     return;
   this.states = this.states | GamerStates.Local;
 }
Ejemplo n.º 3
0
		public NetworkGamer ( NetworkSession session, byte id, GamerStates state)
		{
			this.id = id;
			this.session = session;
			this.gamerState = state;
			// We will modify these HasFlags to inline code because MonoTouch does not support
			// the HasFlag method.  Also after reading this : http://msdn.microsoft.com/en-us/library/system.enum.hasflag.aspx#2
			// it just might be better to inline it anyway.
			//this.isHost = (state & GamerStates.Host) != 0; // state.HasFlag(GamerStates.Host);
			//this.isLocal = (state & GamerStates.Local) != 0; // state.HasFlag(GamerStates.Local);
			//this.hasVoice = (state & GamerStates.HasVoice) != 0; //state.HasFlag(GamerStates.HasVoice);
			
			// *** NOTE TODO **
			// This whole state stuff need to be looked at again.  Maybe we should not be using local
			//  variables here and instead just use the flags within the gamerState.
			
			this.gamerState = state;
			this.oldGamerState = state;
		}
Ejemplo n.º 4
0
		public LocalNetworkGamer (NetworkSession session,byte id,GamerStates state)
			: base(session, id, state | GamerStates.Local)
		{
			sig = new SignedInGamer ();
			receivedData = new Queue<CommandReceiveData>();
		}
Ejemplo n.º 5
0
 public NetworkGamer(NetworkSession session, byte id, GamerStates state)
 {
   this.id = id;
   this.session = session;
   this.gamerState = state;
   this.gamerState = state;
   this.oldGamerState = state;
 }
Ejemplo n.º 6
0
		public CommandGamerStateChange (NetworkGamer gamer)
		{
			this.gamer = gamer;
			this.newState = gamer.State;
			this.oldState = gamer.OldState;
		}