Class: OR2D::Console::State

Inherits:
Struct
  • Object
show all
Defined in:
lib/or2d/console.rb

Overview

Contains the state of the console.

Since:

  • 2023-04-26

Instance Method Summary collapse

Instance Method Details

#disableObject

Disables console input

Since:

  • 2023-04-26



101
102
103
# File 'lib/or2d/console.rb', line 101

def disable
  self.enabled = false
end

#enableObject

Enables console input

Since:

  • 2023-04-26



96
97
98
# File 'lib/or2d/console.rb', line 96

def enable
  self.enabled = true
end

#toggleObject

Toggle console input

Since:

  • 2023-04-26



106
107
108
# File 'lib/or2d/console.rb', line 106

def toggle
  self.enabled = !self.enabled
end