本文整理匯總了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>" );
}
}
示例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 );
}
示例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]" );
}
示例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>");
}
}