samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb
# Holds and outputs a collection of sprites by adding it to args.outputs.sprites
# Also outputs a collection with same parameters (excluding position) by adding
# it to args.outputs.solids and another to args.outputs.borders
Holds and outputs a collection of sprites by adding it to args.outputs.sprites
Also outputs a collection with same parameters (excluding position) by adding
it to args.outputs.solids and another to args.outputs.borders
Holds and outputs a collection of sprites by adding it to args . outputs . sprites Also outputs a collection with same parameters ( excluding position ) by adding it to args . outputs . solids and another to args . outputs . borders
def collection_of_sprites args
  sprites_collection = [
    [
      [400, 0, 50, 50, 'sprites/ship.png'],
      [400, 100, 50, 50, 'sprites/ship.png'],
    ],
    [400, 200, 50, 50, 'sprites/ship.png']
  ]
  args.outputs.sprites << sprites_collection
  args.outputs.solids << [
    [500, 0, 50, 50, 'sprites/ship.png'],
    [500, 100, 50, 50, 'sprites/ship.png'],
    [[[500, 200, 50, 50, 'sprites/ship.png']]]
  ]
  args.outputs.borders << [
    [
      [600, 0, 50, 50, 'sprites/ship.png'],
      [600, 100, 50, 50, 'sprites/ship.png'],
    ],
    [600, 200, 50, 50, 'sprites/ship.png']
  ]
end
def collection_of_sprites args sprites_collection = [ [ [ 400 , 0 , 50 , 50 , 'sprites/ship.png' ] , [ 400 , 100 , 50 , 50 , 'sprites/ship.png' ] , ] , [ 400 , 200 , 50 , 50 , 'sprites/ship.png' ] ] args . outputs . sprites << sprites_collection args . outputs . solids << [ [ 500 , 0 , 50 , 50 , 'sprites/ship.png' ] , [ 500 , 100 , 50 , 50 , 'sprites/ship.png' ] , [ [ [ 500 , 200 , 50 , 50 , 'sprites/ship.png' ] ] ] ] args . outputs . borders << [ [ [ 600 , 0 , 50 , 50 , 'sprites/ship.png' ] , [ 600 , 100 , 50 , 50 , 'sprites/ship.png' ] , ] , [ 600 , 200 , 50 , 50 , 'sprites/ship.png' ] ] end
Holds and outputs a collection of sprites by adding it to args.outputs.sprites
Also outputs a collection with same parameters (excluding position) by adding
it to args.outputs.solids and another to args.outputs.borders
Holds and outputs a collection of sprites by adding it to args . outputs . sprites Also outputs a collection with same parameters ( excluding position ) by adding it to args . outputs . solids and another to args . outputs . borders
args