Ejemplo n.º 1
0
        static void DrawOperationBegin( Player player, CommandReader cmd, DrawOperation op ) {
            // try to create instance of player's currently selected brush
            // all command parameters are passed to the brush
            IBrush brush = player.ConfigureBrush(cmd);

            // MakeInstance returns null if there were problems with syntax, abort
            if( brush == null ) return;
            op.Brush = brush;
            player.SelectionStart( op.ExpectedMarks, DrawOperationCallback, op, Permission.Draw );
            player.Message( "{0}: Click or &H/Mark&S &f{1}&s blocks.",
                            op.Description, op.ExpectedMarks );
        }
Ejemplo n.º 2
0
        static void Fill3DHandler( Player player, CommandReader cmd ) {
            Fill3DDrawOperation op = new Fill3DDrawOperation( player );

            IBrush brush = player.ConfigureBrush(cmd);
            if( brush == null ) return;
            op.Brush = brush;

            player.SelectionStart( 1, Fill3DCallback, op, Permission.Draw );
            player.Message( "{0}: Click a block to start filling.", op.Description );
        }