Server.Multis.BaseBoat.Turn C# (CSharp) Méthode

Turn() public méthode

public Turn ( int offset, bool message ) : bool
offset int
message bool
Résultat bool
		public bool Turn( int offset, bool message )
		{
			if ( m_TurnTimer != null )
			{
				m_TurnTimer.Stop();
				m_TurnTimer = null;
			}

			if ( CheckDecay() )
				return false;

			if ( m_Anchored )
			{
				if ( message )
					m_TillerMan.Say( 501419 ); // Ar, the anchor is down sir!

				return false;
			}
			else if ( SetFacing( (Direction)(((int)m_Facing + offset) & 0x7) ) )
			{
				return true;
			}
			else
			{
				if ( message )
					m_TillerMan.Say( 501423 ); // Ar, can't turn sir.

				return false;
			}
		}