本文整理匯總了C#中fCraft.Player.SelectionResetMarks方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.SelectionResetMarks方法的具體用法?C# Player.SelectionResetMarks怎麽用?C# Player.SelectionResetMarks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類fCraft.Player
的用法示例。
在下文中一共展示了Player.SelectionResetMarks方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ZoneMarkHandler
static void ZoneMarkHandler( Player player, Command cmd )
{
if( player.SelectionMarksExpected == 0 ) {
player.MessageNow( "Cannot use ZMark - no selection in progress." );
} else if( player.SelectionMarksExpected == 2 ) {
string zoneName = cmd.Next();
if( zoneName == null ) {
CdZoneMark.PrintUsage( player );
return;
}
Zone zone = player.WorldMap.Zones.Find( zoneName );
if( zone == null ) {
player.MessageNoZone( zoneName );
return;
}
player.SelectionResetMarks();
player.SelectionAddMark( zone.Bounds.MinVertex, false );
player.SelectionAddMark( zone.Bounds.MaxVertex, true );
} else {
player.MessageNow( "ZMark can only be used for 2-block selection." );
}
}
示例2: MarkAllHandler
private static void MarkAllHandler(Player player, CommandReader cmd) {
Map map = player.WorldMap;
Vector3I coordsMin;
Vector3I coordsMax;
coordsMin.X = 0;
coordsMin.Y = 0;
coordsMin.Z = 0;
coordsMax.X = map.Width - 1;
coordsMax.Y = map.Length - 1;
coordsMax.Z = map.Height - 1;
if (player.IsMakingSelection) {
player.SelectionResetMarks();
player.SelectionAddMark(coordsMin, false, false);
player.SelectionAddMark(coordsMax, true, true);
} else {
player.Message("No selection in progress");
}
}