Class: PFM::Options
- Defined in:
- scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb
Overview
The options data
The options are stored in $options and PFM.game_state.options
Instance Attribute Summary collapse
-
#battle_mode ⇒ Boolean
If the battle ask to switch pokemon or not.
-
#catch_rename ⇒ Boolean
If the battle ask to rename Pokémon at capture.
-
#game_state ⇒ PFM::GameState
Get the game state responsive of the whole game state.
-
#language ⇒ String
The lang id of the Studio::Text loads.
-
#message_frame ⇒ String
The message frame.
-
#message_speed ⇒ Integer
The speed of the message display.
-
#music_volume ⇒ Integer
(also: #master_volume)
The volume of the BGM and ME.
-
#screen_scale ⇒ Integer
The display resolution.
-
#sfx_volume ⇒ Integer
The volume of the BGS and SE.
-
#show_animation ⇒ Boolean
If the battle show move animations.
Instance Method Summary collapse
-
#initialize(starting_language, game_state = PFM.game_state) ⇒ Options
constructor
Create a new Option object with a language.
-
#master_volume=(value)
Change both music & sfx volume at the same time.
Constructor Details
#initialize(starting_language, game_state = PFM.game_state) ⇒ Options
Create a new Option object with a language
41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 41 def initialize(starting_language, game_state = PFM.game_state) @music_volume = 100 @sfx_volume = 100 @message_speed = 3 @battle_mode = true @show_animation = true @catch_rename = true @language = starting_language @screen_scale = Graphics.window.settings[3] @game_state = game_state self. = Configs.window..first end |
Instance Attribute Details
#battle_mode ⇒ Boolean
If the battle ask to switch pokemon or not
18 19 20 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 18 def battle_mode @battle_mode end |
#catch_rename ⇒ Boolean
If the battle ask to rename Pokémon at capture
24 25 26 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 24 def catch_rename @catch_rename end |
#game_state ⇒ PFM::GameState
Get the game state responsive of the whole game state
36 37 38 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 36 def game_state @game_state end |
#language ⇒ String
The lang id of the Studio::Text loads
27 28 29 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 27 def language @language end |
#message_frame ⇒ String
The message frame
30 31 32 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 30 def @message_frame end |
#message_speed ⇒ Integer
The speed of the message display
15 16 17 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 15 def @message_speed end |
#music_volume ⇒ Integer Also known as: master_volume
The volume of the BGM and ME
9 10 11 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 9 def music_volume @music_volume end |
#screen_scale ⇒ Integer
The display resolution
33 34 35 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 33 def screen_scale @screen_scale end |
#sfx_volume ⇒ Integer
The volume of the BGS and SE
12 13 14 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 12 def sfx_volume @sfx_volume end |
#show_animation ⇒ Boolean
If the battle show move animations
21 22 23 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 21 def show_animation @show_animation end |
Instance Method Details
#master_volume=(value)
Change both music & sfx volume at the same time
72 73 74 75 |
# File 'scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb', line 72 def master_volume=(value) self.music_volume = value self.sfx_volume = value end |