Added scripts
This commit is contained in:
parent
d40ae86ba4
commit
5118df09f4
106 changed files with 15680 additions and 0 deletions
30
scripts/Game_SelfSwitches.rb
Normal file
30
scripts/Game_SelfSwitches.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
#==============================================================================
|
||||
# ** Game_SelfSwitches
|
||||
#------------------------------------------------------------------------------
|
||||
# This class handles self switches. It's a wrapper for the built-in class
|
||||
# "Hash." Refer to "$game_self_switches" for the instance of this class.
|
||||
#==============================================================================
|
||||
|
||||
class Game_SelfSwitches
|
||||
#--------------------------------------------------------------------------
|
||||
# * Object Initialization
|
||||
#--------------------------------------------------------------------------
|
||||
def initialize
|
||||
@data = {}
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Get Self Switch
|
||||
# key : key
|
||||
#--------------------------------------------------------------------------
|
||||
def [](key)
|
||||
return @data[key] == true ? true : false
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Set Self Switch
|
||||
# key : key
|
||||
# value : ON (true) / OFF (false)
|
||||
#--------------------------------------------------------------------------
|
||||
def []=(key, value)
|
||||
@data[key] = value
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue