Class: Battle::Visual3D

Inherits:
Visual show all
Defined in:
docs/5_Battle_02_Visual.rb

Overview

Class that manage all the things that are visually seen on the screen used only when BATTLECAMERA is true

Defined Under Namespace

Classes: CameraPositionner

Constant Summary collapse

CAMERA_TRANSLATION =

Default Margin_X : 64 (32px on each side), Margin_Y : 60 (30px on each side) This constant handles the camera coordinates and all info related It is composed by Array made like that :

start_x, final_x, start_y, final_y, start_z, final_z, duration_of_the_movement, wait_after_the_movement

-9 20 1 => is when the camera is centered on your creature (but it’s not the real center of the screen, 0 0 1 is the real one) at default zoom (z = 1)

[[0, -21, 0, 29, 1, 0.9, 2, 1], [-21, 15, 29, -19, 0.9, 1, 3, 1.25], [15, -44, -19, 6, 1, 1, 2.5, 1.5], [-44, 0, 6, 0, 1, 1, 1.4, 2]]
CAMERA_CENTER =

coordinates of the camera centered

[-9, 20, 1, 0.5]

Constants inherited from Visual

Battle::Visual::ABILITY_SOUND_EFFECT, Battle::Visual::BAG_PARTY_POSITIONS, Battle::Visual::ITEM_SOUND_EFFECT

Instance Attribute Summary collapse

Attributes inherited from Visual

#animations, #parallel_animations, #to_dispose, #viewport, #viewport_sub

Instance Method Summary collapse

Methods inherited from Visual

#battler_sprite, #dispose, #hide_ability, #hide_info_bar, #hide_info_bars, #hide_team_info, #lock, #locking?, #refresh_info_bar, register_transition_resource, #scene_update_proc, #set_info_state, #show_ability, #show_catch_animation, #show_exp_distribution, #show_hp_animations, #show_info_bar, #show_info_bars, #show_item, #show_item_choice, #show_kos, #show_move_animation, #show_player_choice, #show_pokemon_choice, #show_pre_transition, #show_rmxp_animation, #show_skill_choice, #show_switch_form_animation, #show_target_choice, #show_team_info, #show_transition, #show_transition_battle_end, #snap_to_bitmaps, #spc_show_message, #store_battler_sprite, #to_s, transition_resource_type_for, #unlock, #wait_for_animation

Constructor Details

#initialize(scene) ⇒ Visual3D

Create a new visual instance

Parameters:

  • scene (Scene)

    scene that hold the logic object



1265
1266
# File 'docs/5_Battle_02_Visual.rb', line 1265

def initialize(scene)
end

Instance Attribute Details

#cameraFake3D::Camera

Camera of the battle

Returns:



1259
1260
1261
# File 'docs/5_Battle_02_Visual.rb', line 1259

def camera
  @camera
end

#camera_positionnerFake3D::Camera

Camera Positionner of the camera

Returns:



1262
1263
1264
# File 'docs/5_Battle_02_Visual.rb', line 1262

def camera_positionner
  @camera_positionner
end

Instance Method Details

#no_movement_duration

Time without moving at the beginning of start_camera_animation



1331
1332
# File 'docs/5_Battle_02_Visual.rb', line 1331

def no_movement_duration
end

#start_actor_animation

Define the translation to zoom on the Pokemon



1325
1326
# File 'docs/5_Battle_02_Visual.rb', line 1325

def start_actor_animation
end

#start_camera_animation

Define the camera animation across the Battle Scene



1322
1323
# File 'docs/5_Battle_02_Visual.rb', line 1322

def start_camera_animation
end

#start_center_animation

Define the translation to the center of the Screen



1328
1329
# File 'docs/5_Battle_02_Visual.rb', line 1328

def start_center_animation
end

#stop_camera

delete all cameras



1334
1335
# File 'docs/5_Battle_02_Visual.rb', line 1334

def stop_camera
end

#update

Update the visuals



1268
1269
# File 'docs/5_Battle_02_Visual.rb', line 1268

def update
end

#update_camera

Update the position of the camera



1319
1320
# File 'docs/5_Battle_02_Visual.rb', line 1319

def update_camera
end