Ejemplo n.º 1
0
        public virtual void EndGame()
        {
            if (_WinnerTimer != null)
            {
                _WinnerTimer.Stop();
                _WinnerTimer = null;
            }

            _PendingPlayers = null;
            _SettingsReady  = !_AllowPlayerConfiguration;
            InvalidateProperties();

            foreach (Mobile player in Players)
            {
                player.CloseGump(typeof(BoardGameGump));
            }
        }
Ejemplo n.º 2
0
        //this cleans up all movable addon components, and removes the reference to this addon in the key item
        public override void OnAfterDelete()
        {
            base.OnAfterDelete();

            if (_WinnerTimer != null)
            {
                _WinnerTimer.Stop();
                _WinnerTimer = null;
            }

            foreach (GamePiece piece in BackgroundItems)
            {
                if (piece != null && !piece.Deleted)
                {
                    piece.Delete();
                }
            }

            if (_BoardGameRegion != null)
            {
                _BoardGameRegion.Unregister();
            }
        }
		//this cleans up all movable addon components, and removes the reference to this addon in the key item
		public override void OnAfterDelete()
		{
			base.OnAfterDelete();
			
			if( _WinnerTimer != null )
			{
				_WinnerTimer.Stop();
				_WinnerTimer = null;
			}

			foreach( GamePiece piece in BackgroundItems )
			{
				if( piece != null && !piece.Deleted )
				{
					piece.Delete();
				}
			}
			
			if( _BoardGameRegion != null )
			{
				_BoardGameRegion.Unregister();
			}

		}
		public override void Delete()
		{
			if( _WinnerTimer != null )
			{
				_WinnerTimer.Stop();
				_WinnerTimer = null;
			}
			if( _EndGameTimer != null )
			{
				_EndGameTimer.Stop();
				_EndGameTimer = null;
			}
			
			base.Delete();
		}
		protected virtual void AnnounceWinner()
		{
			_State = BoardGameState.GameOver;
			_WinnerTimer = new WinnerTimer( this, WinDelay );
			_WinnerTimer.Start();
		}
		public virtual void EndGame()
		{
			if( _WinnerTimer != null )
			{
				_WinnerTimer.Stop();
				_WinnerTimer = null;
			}
			
			_PendingPlayers = null;
			_SettingsReady = !_AllowPlayerConfiguration;
			InvalidateProperties();
			
			foreach( Mobile player in Players )
			{
				player.CloseGump( typeof( BoardGameGump ) );
			}
		}
Ejemplo n.º 7
0
 protected virtual void AnnounceWinner()
 {
     _State       = BoardGameState.GameOver;
     _WinnerTimer = new WinnerTimer(this, WinDelay);
     _WinnerTimer.Start();
 }