class Itchy

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/scrit.rb, line 8
def initialize
    super 480, 360, false
    self.caption = "Scrit (Scratch in Ruby)"

    @stage = Stage.new(self)
    @sprites = []#[Cloud.new(self), Fish.new(self)]
end

Public Instance Methods

button_down(id) click to toggle source
# File lib/scrit.rb, line 29
def button_down(id)
    if id == Gosu::KbEscape
        close
    end
end
draw() click to toggle source
# File lib/scrit.rb, line 24
def draw
    @stage.draw
    @sprites.each { |s| s.draw }
end
green_flag() click to toggle source
# File lib/scrit.rb, line 16
def green_flag
    show
end
stage() click to toggle source
# File lib/scrit.rb, line 35
def stage
    @stage
end
update() click to toggle source
# File lib/scrit.rb, line 20
def update
    @sprites.each { |s| s.scripts }
end