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

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, #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

new, #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:



1868
1869
# File 'docs/5_Battle_01_Scene.rb', line 1868

def initialize(viewport, scene)
end

Instance Method Details

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

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:



1882
1883
# File 'docs/5_Battle_01_Scene.rb', line 1882

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::Animation::TimedAnimation



1874
1875
# File 'docs/5_Battle_01_Scene.rb', line 1874

def create_animations
end

#create_graphics

Create all the graphic elements for the BattleBack



1871
1872
# File 'docs/5_Battle_01_Scene.rb', line 1871

def create_graphics
end

#resource_path

Return the path for the resources



1885
1886
# File 'docs/5_Battle_01_Scene.rb', line 1885

def resource_path
end