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



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

def disable
  self.enabled = false
end

#enableObject

Enables console input

Since:

  • 2023-04-26



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

def enable
  self.enabled = true
end

#toggleObject

Toggle console input

Since:

  • 2023-04-26



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

def toggle
  self.enabled = !self.enabled
end