Class: BattleUI::Battleback3D

Overview

Class that describes a 3D Battle Background

Direct Known Subclasses

BattleBackGrass

Constant Summary collapse

MARGIN_X =

Margin X to apply to the background position

Returns:

  • (Integer)
64
MARGIN_Y =

Margin Y to apply to the background position

Returns:

  • (Integer)
68

Instance Attribute Summary collapse

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

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(viewport, scene) ⇒ Battleback3D

Create a new BattleBack3D

Parameters:



2068
2069
# File 'docs/5_Battle_01_Scene.rb', line 2068

def initialize(viewport, scene)
end

Instance Attribute Details

#scene ⇒ Battle::Scene (readonly)

Get the scene linked to this object

Returns:



2061
2062
2063
# File 'docs/5_Battle_01_Scene.rb', line 2061

def scene
  @scene
end

#shader_tone_opacity ⇒ Float

The opacity's value of the background tone

Returns:

  • (Float)


2064
2065
2066
# File 'docs/5_Battle_01_Scene.rb', line 2064

def shader_tone_opacity
  @shader_tone_opacity
end

Instance Method Details

#battleback_sprite3D

Return an Array containing the elements of the background



2082
2083
# File 'docs/5_Battle_01_Scene.rb', line 2082

def battleback_sprite3D
end

#create_animations

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



2091
2092
# File 'docs/5_Battle_01_Scene.rb', line 2091

def create_animations
end

#create_graphics

Create all the graphic elements for the BattleBack



2088
2089
# File 'docs/5_Battle_01_Scene.rb', line 2088

def create_graphics
end

#dark_tone_animation(duration = 0.5, tone_opacity = 0.5)

Start a dark tone animation on the background

Parameters:

  • duration (Float) (defaults to: 0.5)
  • tone_opacity (Float) (defaults to: 0.5)


2096
2097
# File 'docs/5_Battle_01_Scene.rb', line 2096

def dark_tone_animation(duration = 0.5, tone_opacity = 0.5)
end

#reset_tone_animation(duration = 0.5)

Reset the tone animation on the background

Parameters:

  • duration (Float) (defaults to: 0.5)


2100
2101
# File 'docs/5_Battle_01_Scene.rb', line 2100

def reset_tone_animation(duration = 0.5)
end

#set_position(x, y, z = 1) ⇒ self

Set the position of the sprite

Parameters:

  • x (Numeric)
  • y (Numeric)
  • z (Numeric) (defaults to: 1) —

    z position of the sprite (1 is most likely at scale, 2 is smaller and 0 is illegal)

Returns:

  • (self)


2075
2076
# File 'docs/5_Battle_01_Scene.rb', line 2075

def set_position(x, y, z = 1)
end

#update_battleback

Update the background Elements (especially the animated elements)



2085
2086
# File 'docs/5_Battle_01_Scene.rb', line 2085

def update_battleback
end

#z=(z)

Set the z position of the sprite

Parameters:

  • z (Numeric)


2079
2080
# File 'docs/5_Battle_01_Scene.rb', line 2079

def z=(z)
end