Sha256: f22a9447777b90678ea47169125d31bfa32b9c99677387f8c7f7e3b208ea3edd

Contents?: true

Size: 406 Bytes

Versions: 5

Compression:

Stored size: 406 Bytes

Contents

require 'level'
require 'ftor'
class DemoLevel < Level
  def setup
    @my_actor = create_actor :my_actor
    @my_actor.x = 10
    @my_actor.y = 10

    @stars = []
    20.times { @stars << Ftor.new(rand(@width),rand(@height)) }
  end

  def draw(target, x_off, y_off)
    target.fill [25,25,25,255]
    for star in @stars
      target.draw_circle_s([star.x,star.y],1,[255,255,255,255])
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gamebox-0.0.1 lib/gamebox/template_app/src/demo_level.rb
gamebox-0.0.2 lib/gamebox/template_app/src/demo_level.rb
gamebox-0.0.3 lib/gamebox/template_app/src/demo_level.rb
gamebox-0.0.4 lib/gamebox/template_app/src/demo_level.rb
gamebox-0.0.5 lib/gamebox/template_app/src/demo_level.rb