Module: TexPlay

Includes:
Colors
Included in:
Gosu::Image
Defined in:
lib/texplay.rb

Defined Under Namespace

Modules: Colors

Constant Summary collapse

TEXPLAY_VERSION =
"0.2.1"

Constants included from Colors

Colors::Alpha, Colors::Black, Colors::Blue, Colors::Brown, Colors::Cyan, Colors::Green, Colors::Grey, Colors::Orange, Colors::Purple, Colors::Red, Colors::Turquoise, Colors::Tyrian, Colors::White, Colors::Yellow

Class Method Summary collapse

Class Method Details

.create_blank_image(window, width, height) ⇒ Object



30
31
32
# File 'lib/texplay.rb', line 30

def self.create_blank_image(window, width, height)
    Gosu::Image.new(window, EmptyImageStub.new(width, height))
end

.on_setup(&block) ⇒ Object



15
16
17
18
19
20
# File 'lib/texplay.rb', line 15

def self.on_setup(&block)
    raise "need a block" if !block
    
    @__init_procs__ ||= []
    @__init_procs__.push(block)
end

.setup(receiver) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/texplay.rb', line 22

def self.setup(receiver)
    if @__init_procs__ then
        @__init_procs__.each do |init_proc|
            receiver.instance_eval(&init_proc)
        end
    end
end