Class: BattleUI::BattleBackGrass

Overview

Here we only deal with the method for creating graphic elements associated with a Battleback when BATTLE_CAMERA_3D is activated. This is an example, so feel free to create your own. Reminder : All the coordinates are calculated from the center of your Viewport which is : x = Graphics.width and y = Graphics.height

Constant Summary

Constants inherited from Battleback3D

BattleUI::Battleback3D::MARGIN_X, BattleUI::Battleback3D::MARGIN_Y

Instance Attribute Summary

Attributes inherited from Battleback3D

#scene, #shader_tone_opacity

Attributes inherited from LiteRGSS::ShaderedSprite

#blendmode, #shader

Attributes inherited from LiteRGSS::Sprite

#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y

Instance Method Summary collapse

Methods inherited from Battleback3D

#battleback_sprite3D, #dark_tone_animation, #reset_tone_animation, #set_position, #update_battleback, #z=

Methods inherited from Sprite

#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords, #update

Methods inherited from LiteRGSS::Sprite

#set_origin, #set_position

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(viewport, scene) ⇒ BattleBackGrass

Function that define the Battleback To create your own Battleback you need to follow the same pattern

Parameters:



2315
2316
# File 'docs/5_Battle_01_Scene.rb', line 2315

def initialize(viewport, scene)
end

Instance Method Details

#create_animation_cloud(element, start_x, final_x, duration) ⇒ Yuki::AnimationMixin

create the animation for a cloud, this animation loops automatically, so it returns to start_x

Parameters:

  • element (BattleUI::Sprite3D) —

    element from the backgound to be animated

  • start_x (Integer) —

    x coordinates for the start of the animation

  • final_x (Integer) —

    x coordinates for the target of the animation

  • duration (Float) —

    duration of the animation in seconds (must be superior to 2.0)

Returns:



2329
2330
# File 'docs/5_Battle_01_Scene.rb', line 2329

def create_animation_cloud(element, start_x, final_x, duration)
end

#create_animations

Create all the animations for the graphics element in an array of Yuki::AnimationMixin



2321
2322
# File 'docs/5_Battle_01_Scene.rb', line 2321

def create_animations
end

#create_graphics

Create all the graphic elements for the BattleBack



2318
2319
# File 'docs/5_Battle_01_Scene.rb', line 2318

def create_graphics
end

#resource_path

Return the path for the resources



2332
2333
# File 'docs/5_Battle_01_Scene.rb', line 2332

def resource_path
end