Class: Scene_Map

Inherits:
GamePlay::Base show all
Includes:
Graphics::FPSBalancer::Marker
Defined in:
docs/4_Systems_003_Map_Engine.rb

Overview

The map gameplay scene

Constant Summary collapse

PSN_COLOR =

Poison flash color

Color.new(123, 55, 123, 128)
RMXP_WILD_BATTLE_GROUPS =

List of RMXP Group that should be treated as "wild battle"

[1, 30]

Constants inherited from GamePlay::Base

GamePlay::Base::DEFAULT_TRANSITION, GamePlay::Base::DEFAULT_TRANSITION_PARAMETER

Constants included from Input

Input::ALIAS_KEYS, Input::AXIS_MAPPING, Input::AXIS_SENSITIVITY, Input::DEAD_ZONE, Input::Keyboard, Input::Keys, Input::NON_TRIGGER_ZONE, Input::REPEAT_COOLDOWN, Input::REPEAT_SPACE

Constants included from GamePlay::DisplayMessage

GamePlay::DisplayMessage::MESSAGE_ERROR, GamePlay::DisplayMessage::MESSAGE_PROCESS_ERROR

Class Attribute Summary collapse

Instance Attribute Summary collapse

Attributes inherited from GamePlay::Base

#__last_scene, #__result_process, #clock, #running, #viewport

Attributes included from GamePlay::DisplayMessage

#message_window

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Graphics::FPSBalancer::Marker

#frame_balanced?

Methods inherited from GamePlay::Base

#add_disposable, #call_scene, #dispose, #find_parent, #main, #return_to_scene, #visible

Methods included from Input

clear, close_virtual_keyboard, dir4, dir8, get_text, joy_axis_position, load_touch_screen, open_virtual_keyboard, press?, register_events, released?, repeat?, swap_states, trigger?

Methods included from GamePlay::DisplayMessage

#can_display_message_be_called?, #close_message_window, #display_message, #display_message_and_wait, #message_class, #message_processing?, #message_visible, #message_visible=

Constructor Details

#initialize ⇒ Scene_Map

Create a new Scene_Map



4062
4063
# File 'docs/4_Systems_003_Map_Engine.rb', line 4062

def initialize
end

Class Attribute Details

.battle_modes ⇒ Array<Proc> (readonly)

List all the battle modes

Returns:

  • (Array<Proc>)


4154
4155
4156
# File 'docs/4_Systems_003_Map_Engine.rb', line 4154

def battle_modes
  @battle_modes
end

.triggers ⇒ Hash{ Symbol => Proc } (readonly)

List of call_xxx trigger

Returns:

  • (Hash{ Symbol => Proc })


4146
4147
4148
# File 'docs/4_Systems_003_Map_Engine.rb', line 4146

def triggers
  @triggers
end

Instance Attribute Details

#spriteset ⇒ Spriteset_Map (readonly)

Access to the spriteset of the map

Returns:



4058
4059
4060
# File 'docs/4_Systems_003_Map_Engine.rb', line 4058

def spriteset
  @spriteset
end

Class Method Details

.add_call_scene(method_name, &block)

Add a call scene in Scene_Map

Parameters:

  • method_name (Symbol) —

    name of the method to call (no argument)

  • block (Proc) —

    block to execute in order to be sure the scene callable



4150
4151
# File 'docs/4_Systems_003_Map_Engine.rb', line 4150

def add_call_scene(method_name, &block)
end

.register_battle_mode(id, &block) {|scene| ... }

Add a battle mode

Parameters:

  • id (Integer) —

    ID of the battle mode

  • block (Proc)

Yield Parameters:



4159
4160
# File 'docs/4_Systems_003_Map_Engine.rb', line 4159

def register_battle_mode(id, &block)
end

Instance Method Details

#after_snapping_viewport_to_bitmap(texture) ⇒ Texture

Function called after snapping the snap to bitmap viewport

Parameters:

Returns:



4118
4119
# File 'docs/4_Systems_003_Map_Engine.rb', line 4118

def after_snapping_viewport_to_bitmap(texture)
end

#before_snapping_viewport_to_bitmap(viewport)

Function called before snapping the snap to bitmap viewport

Parameters:

  • viewport (Viewport) —

    viewport that is used for the snap to bitmap



4113
4114
# File 'docs/4_Systems_003_Map_Engine.rb', line 4113

def before_snapping_viewport_to_bitmap(viewport)
end

#delay_display_call(*args)

Prepare the call of a display_ method

Parameters:

  • args (Array) —

    the send method parameter



4100
4101
# File 'docs/4_Systems_003_Map_Engine.rb', line 4100

def delay_display_call(*args)
end

#display_egg_hatch(pokemon)

Display the Egg hatch sequence

Parameters:



4096
4097
# File 'docs/4_Systems_003_Map_Engine.rb', line 4096

def display_egg_hatch(pokemon)
end

#display_poison_animation

Display the poisoning animation sequence



4092
4093
# File 'docs/4_Systems_003_Map_Engine.rb', line 4092

def display_poison_animation
end

#display_poison_end(pokemon)

Display the end of poisoning sequence

Parameters:



4086
4087
# File 'docs/4_Systems_003_Map_Engine.rb', line 4086

def display_poison_end(pokemon)
end

#display_poison_faint(pokemon)

Display text showing pokemon fainted from poison



4089
4090
# File 'docs/4_Systems_003_Map_Engine.rb', line 4089

def display_poison_faint(pokemon)
end

#display_repel_check

Display the repel check sequence



4082
4083
# File 'docs/4_Systems_003_Map_Engine.rb', line 4082

def display_repel_check
end

#setup_start_battle(klass, battle_info)

Ensure the battle will start without any weird behaviour

Parameters:



4165
4166
# File 'docs/4_Systems_003_Map_Engine.rb', line 4165

def setup_start_battle(klass, battle_info)
end

#snap_to_bitmap ⇒ Texture

Note:

You have to dispose the bitmap you got from this function

Take a snapshot of the scene

Returns:



4109
4110
# File 'docs/4_Systems_003_Map_Engine.rb', line 4109

def snap_to_bitmap
end

#sprite_set_update

Update everything related to the graphics of the map (used in Interfaces that require that)



4075
4076
# File 'docs/4_Systems_003_Map_Engine.rb', line 4075

def sprite_set_update
end

#sprite_set_visible=(v)

Change the spriteset visibility

Parameters:

  • v (Boolean) —

    the new visibility of the spriteset



4079
4080
# File 'docs/4_Systems_003_Map_Engine.rb', line 4079

def sprite_set_visible=(v)
end

#update

Update the scene process



4065
4066
# File 'docs/4_Systems_003_Map_Engine.rb', line 4065

def update
end

#update_graphics

Section where we update the graphics of the scene (for now only spriteset)



4068
4069
# File 'docs/4_Systems_003_Map_Engine.rb', line 4068

def update_graphics
end

#visible=(value)

Change the viewport visibility of the scene (we overwrite it because we don't want viewport to be hidden when calling a scene)

Parameters:

  • value (Boolean)


4072
4073
# File 'docs/4_Systems_003_Map_Engine.rb', line 4072

def visible=(value)
end

#window_message_close(smooth)

Force the message window to close

Parameters:

  • smooth (Boolean) —

    if the message window is closed smoothly or not



4104
4105
# File 'docs/4_Systems_003_Map_Engine.rb', line 4104

def window_message_close(smooth)
end