Class: Input

Inherits:
Object
  • Object
show all
Defined in:
lib/consolegl.rb

Class Method Summary collapse

Class Method Details

.KeyPressed(key) ⇒ Object



29
30
31
32
33
34
35
36
# File 'lib/consolegl.rb', line 29

def self.KeyPressed(key)
    ch = STDIN.getch
    if ch.to_s == key
        return true
    else
        return false
    end
end