當前位置: 首頁>>代碼示例>>C#>>正文


C# Server.GetBoolean方法代碼示例

本文整理匯總了C#中Server.Server.GetBoolean方法的典型用法代碼示例。如果您正苦於以下問題:C# Server.GetBoolean方法的具體用法?C# Server.GetBoolean怎麽用?C# Server.GetBoolean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Server的用法示例。


在下文中一共展示了Server.GetBoolean方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Animate_OnCommand

 public static void Animate_OnCommand( Server.Commands.CommandEventArgs e )
 {
     if ( e.Length == 6 )
     {
         e.Mobile.Animate( e.GetInt32( 0 ), e.GetInt32( 1 ), e.GetInt32( 2 ), e.GetBoolean( 3 ), e.GetBoolean( 4 ), e.GetInt32( 5 ) );
     }
     else
     {
         e.Mobile.SendAsciiMessage( "Format: Animate <action> <frameCount> <repeatCount> <forward> <repeat> <delay>" );
     }
 }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:11,代碼來源:Handlers.cs

示例2: Randomize_OnCommand

		public static void Randomize_OnCommand( Server.Commands.CommandEventArgs args )
		{
			Mobile m = args.Mobile;

			if( args.Length != 4 )
			{
				m.SendMessage( "Format: Randomize <starting itemID> <ending itemID> <Z level> <bool includeNonFlooring>" );
				return;
			}

			int start = args.GetInt32( 0 );
			int end = args.GetInt32( 1 );
			int z = args.GetInt32( 2 );
			bool walls = args.GetBoolean( 3 );

			object[] state = new object[4] { start, end, z, walls };

			BoundingBoxPicker.Begin( m, new BoundingBoxCallback( BoxPickerCallback ), state );
		}
開發者ID:greeduomacro,項目名稱:hubroot,代碼行數:19,代碼來源:RandomizeCommand.cs

示例3: Sound_OnCommand

 public static void Sound_OnCommand( Server.Commands.CommandEventArgs e )
 {
     if ( e.Length == 1 )
         PlaySound( e.Mobile, e.GetInt32( 0 ), true );
     else if ( e.Length == 2 )
         PlaySound( e.Mobile, e.GetInt32( 0 ), e.GetBoolean( 1 ) );
     else
         e.Mobile.SendAsciiMessage( "Format: Sound <index> [toAll]" );
 }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:9,代碼來源:Handlers.cs

示例4: SetGuarded_OnCommand

        private static void SetGuarded_OnCommand(Server.Commands.CommandEventArgs e)
        {
            Mobile from = e.Mobile;

            if (e.Length == 1)
            {
                GuardedRegion reg = from.Region as GuardedRegion;

                if (reg == null)
                {
                    from.SendAsciiMessage("You are not in a guardable region.");
                }
                else
                {
                    reg.Disabled = !e.GetBoolean(0);
                    from.SendAsciiMessage("After your changes:");
                    reg.TellGuardStatus(from);
                }
            }
            else
            {
                from.SendAsciiMessage("Format: SetGuarded <true|false>");
            }
        }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:24,代碼來源:GuardedRegion.cs


注:本文中的Server.Server.GetBoolean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。