本文整理汇总了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>");
}
}