Class: RPG::Animation::Timing

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/animation.rb

Overview

Data class for the timing of an animation’s SE and flash effects.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTiming

Returns a new instance of Timing.



78
79
80
81
82
83
84
85
# File 'lib/rpg/animation.rb', line 78

def initialize
  @frame = 0
  @se = RPG::AudioFile.new("", 80)
  @flash_scope = 0
  @flash_color = Color.new(255,255,255,255)
  @flash_duration = 5
  @condition = 0
end

Instance Attribute Details

#conditionObject

Condition of the effect:

0

none

1

hit

2

miss



110
111
112
# File 'lib/rpg/animation.rb', line 110

def condition
  @condition
end

#flash_colorObject

Flash Color.



101
102
103
# File 'lib/rpg/animation.rb', line 101

def flash_color
  @flash_color
end

#flash_durationObject

Flash duration.



104
105
106
# File 'lib/rpg/animation.rb', line 104

def flash_duration
  @flash_duration
end

#flash_scopeObject

Flash area:

0

none

1

target

2

screen

3

delete target



98
99
100
# File 'lib/rpg/animation.rb', line 98

def flash_scope
  @flash_scope
end

#frameObject

Frame number. 1 less than the number displayed in RPGXP.



88
89
90
# File 'lib/rpg/animation.rb', line 88

def frame
  @frame
end

#seObject

SE, or sound effect (RPG::AudioFile).



91
92
93
# File 'lib/rpg/animation.rb', line 91

def se
  @se
end