Module: Reflexion

Includes:
Rays, Reflex
Defined in:
lib/reflexion.rb

Defined Under Namespace

Classes: MainWindow

Constant Summary collapse

DEFAULTS =
{
  title: 'Reflexion',
  frame: [100, 100, 512, 512]
}
@@window =
MainWindow.new DEFAULTS

Constants included from Reflex

Reflex::Bitmap, Reflex::Bounds, Reflex::CAPTURE_FLAG, Reflex::Color, Reflex::ColorSpace, Reflex::Font, Reflex::Image, Reflex::Painter, Reflex::Point, Reflex::Shader, Reflex::Texture

Class Method Summary collapse

Class Method Details

.draw(&block) ⇒ Object



82
83
84
# File 'lib/reflexion.rb', line 82

def draw (&block)
  window.draw = block
end

.eventObject



70
71
72
# File 'lib/reflexion.rb', line 70

def event ()
  window.event
end

.key(&block) ⇒ Object



86
87
88
# File 'lib/reflexion.rb', line 86

def key (&block)
  window.key = block
end

.pointer(&block) ⇒ Object



90
91
92
# File 'lib/reflexion.rb', line 90

def pointer (&block)
  window.pointer = block
end

.quitObject



99
100
101
# File 'lib/reflexion.rb', line 99

def quit ()
  window.close
end

.setup(&block) ⇒ Object



74
75
76
# File 'lib/reflexion.rb', line 74

def setup (&block)
  window.setup = block
end

.startObject



94
95
96
97
# File 'lib/reflexion.rb', line 94

def start ()
  window.show
  Reflex.start
end

.update(&block) ⇒ Object



78
79
80
# File 'lib/reflexion.rb', line 78

def update (&block)
  window.update = block
end

.windowObject



66
67
68
# File 'lib/reflexion.rb', line 66

def window ()
  @@window
end