Class: CustomEasing
- Inherits:
-
Metro::Easing
- Object
- Metro::Easing
- CustomEasing
- Defined in:
- lib/templates/game/lib/custom_easing.rb
Overview
This custom easing is an exact copy of the ‘Ease In’ easing defined in Metro. It is present here as an example.
Class Method Summary collapse
-
.calculation(moment, start, change, interval) ⇒ Float
The value at the particular moment of the interval.
Methods inherited from Metro::Easing
calculate, easing_for, easings, register
Class Method Details
.calculation(moment, start, change, interval) ⇒ Float
Returns the value at the particular moment of the interval.
26 27 28 29 |
# File 'lib/templates/game/lib/custom_easing.rb', line 26 def self.calculation(moment,start,change,interval) # @note this is the exact same as the already defined Ease In change * (moment = moment / interval) * moment + start end |