Class: FlameChannelParser::Segments::ConstantFunction

Inherits:
ConstantSegment show all
Defined in:
lib/segments.rb

Overview

This can be used for an anim curve that stays constant all along

Constant Summary

Constants inherited from ConstantSegment

FlameChannelParser::Segments::ConstantSegment::NEG_INF, FlameChannelParser::Segments::ConstantSegment::POS_INF

Instance Attribute Summary

Attributes inherited from ConstantSegment

#end_frame, #start_frame

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ConstantFunction

Returns a new instance of ConstantFunction.



246
247
248
# File 'lib/segments.rb', line 246

def initialize(value)
  @value = value
end

Instance Method Details

#defines?(frame) ⇒ Boolean

:nodoc:

Returns:

  • (Boolean)


242
243
244
# File 'lib/segments.rb', line 242

def defines?(frame)
  true
end

#value_at(frame) ⇒ Object



250
251
252
# File 'lib/segments.rb', line 250

def value_at(frame)
  @value
end