Exemplo n.º 1
0
        public Player()
        {
            BassNet.Registration("*****@*****.**", "2X1723201782018");
            //engine initialization
            Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, System.IntPtr.Zero);

            //set default status
            curStatus = PLAYER_STATUS.PLAYER_STATUS_NOT_READY;
        }
Exemplo n.º 2
0
        public int points;                  /**< All the added points gain in the game.*/

        /**
         *  Constructor.
         *  @param  name    The name of the player.
         *  @param  _id     The id of the player.
         *  @param  _ip     The ip of the player.
         *  @param  _port   The port of the player.
         */
        public Profile(string name, int _id, string _ip, int _port)
        {
            owner    = name;
            id       = _id;
            ip       = _ip;
            port     = _port;
            deck     = new Deck();
            status   = PLAYER_STATUS.ONLINE;
            contract = null;
            win      = new Deck();
            ready    = false;
            points   = 0;
        }
Exemplo n.º 3
0
 void engine_StatusChanged(PLAYER_STATUS status, EventArgs e)
 {
     switch (status)
     {
         case PLAYER_STATUS.PLAYER_STATUS_ENDED:
             OnStatusEnded();
             break;
         case PLAYER_STATUS.PLAYER_STATUS_NOT_READY:
             OnStatusNotReady();
             break;
         case PLAYER_STATUS.PLAYER_STATUS_PAUSED:
             OnStatusPaused();
             break;
         case PLAYER_STATUS.PLAYER_STATUS_PLAYING:
             OnStatusPlaying();
             break;
         case PLAYER_STATUS.PLAYER_STATUS_READY_STOPPED:
             //This event will come immediately after the attachfile so we can say the playback is about to start
             OnStatusStopped();
             break;
     }
 }
Exemplo n.º 4
0
 //Update the UI with new status of player
 private void UpdateStatus(PLAYER_STATUS status)
 {
     curStatus = status;
     StatusChanged(curStatus,null);
 }