本文整理汇总了C#中fCraft.Command.NextBlock方法的典型用法代码示例。如果您正苦于以下问题:C# Command.NextBlock方法的具体用法?C# Command.NextBlock怎么用?C# Command.NextBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fCraft.Command
的用法示例。
在下文中一共展示了Command.NextBlock方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CutHandler
static void CutHandler( Player player, Command cmd )
{
Block fillBlock = Block.Air;
if( cmd.HasNext ) {
fillBlock = cmd.NextBlock( player );
if( fillBlock == Block.Undefined ) return;
if( cmd.HasNext ) {
CdCut.PrintUsage( player );
return;
}
}
CutDrawOperation op = new CutDrawOperation( player ) {
Brush = new NormalBrush( fillBlock )
};
player.SelectionStart( 2, DrawOperationCallback, op, Permission.Draw );
if( fillBlock != Block.Air ) {
player.Message( "Cut/{0}: Click 2 blocks or use &H/Mark&S to make a selection.",
fillBlock );
} else {
player.Message( "Cut: Click 2 blocks or use &H/Mark&S to make a selection." );
}
}
示例2: CutHandler
static void CutHandler( Player player, Command cmd ) {
Block fillBlock = Block.Air;
if( cmd.HasNext ) {
fillBlock = cmd.NextBlock( player );
if( fillBlock == Block.Undefined ) return;
if( cmd.HasNext ) {
CdCut.PrintUsage( player );
return;
}
}
CutDrawOperation op = new CutDrawOperation( player ) {
Brush = new NormalBrush( fillBlock )
};
player.SelectionStart( 2, DrawOperationCallback, op, Permission.Draw );
player.Message( "{0}: Click 2 or &H/Mark&S 2 blocks.",
op.Description );
}