Class: Game_SelfSwitches

Inherits:
Object show all
Defined in:
scripts/00600 Script_RMXP/00100 Event_Living_Data.rb

Overview

Describe switches that are related to a specific event

Author:

  • Enterbrain

Instance Method Summary collapse

Constructor Details

#initializeGame_SelfSwitches

Default initialization



87
88
89
# File 'scripts/00600 Script_RMXP/00100 Event_Living_Data.rb', line 87

def initialize
  @data = {}
end

Instance Method Details

#[](key) ⇒ Boolean

Get the state of a self switch

Parameters:

  • key (Array)

    the key that identify the self switch

Returns:

  • (Boolean)


94
95
96
# File 'scripts/00600 Script_RMXP/00100 Event_Living_Data.rb', line 94

def [](key)
  return @data[key]
end

#[]=(key, value)

Set the state of a self switch

Parameters:

  • key (Array)

    the key that identify the self switch

  • value (Boolean)

    the new value of the self switch



101
102
103
# File 'scripts/00600 Script_RMXP/00100 Event_Living_Data.rb', line 101

def []=(key, value)
  @data[key] = value
end