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

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

- (ConstantFunction) initialize(value)

A new instance of ConstantFunction



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

def initialize(value)
  @value = value
end

Instance Method Details

- (Boolean) defines?(frame)

:nodoc:

Returns:

  • (Boolean)


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

def defines?(frame)
  true
end

- (Object) value_at(frame)



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

def value_at(frame)
  @value
end