This repository has been archived on 2021-07-14. You can view files and clone it, but cannot push or open issues or pull requests.
scriptcraft/src/main/js/plugins/drone/contrib/skyscraper-example.js

19 lines
497 B
JavaScript
Raw Normal View History

2013-12-24 01:18:43 +01:00
var Drone = require('../drone').Drone;
var blocks = require('blocks');
Drone.extend('skyscraper', function( floors ) {
var i = 0;
if ( typeof floors == 'undefined' ) {
floors = 10;
}
this.chkpt('skyscraper');
for ( i = 0; i < floors; i++ ) {
this // w h d
.box( blocks.iron, 20, 1, 20) // iron floor
.up() // w h d
.box0(blocks.glass_pane, 20, 3, 20) // glass walls
.up(3);
}
return this.move('skyscraper');
});