mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-17 05:22:35 +00:00
Ran rubocop -a
This commit is contained in:
@@ -2,8 +2,10 @@ module CyberarmEngine
|
||||
class Animator
|
||||
DEFAULT_TWEEN = :linear
|
||||
def initialize(start_time:, duration:, from:, to:, &block)
|
||||
@start_time, @duration = start_time, duration
|
||||
@from, @to = from.dup, to.dup
|
||||
@start_time = start_time
|
||||
@duration = duration
|
||||
@from = from.dup
|
||||
@to = to.dup
|
||||
@block = block
|
||||
end
|
||||
|
||||
@@ -23,7 +25,7 @@ module CyberarmEngine
|
||||
from + (to - from) * send("tween_#{tween}", progress)
|
||||
end
|
||||
|
||||
def color_transition(from, to, tween = DEFAULT_TWEEN)
|
||||
def color_transition(from, to, _tween = DEFAULT_TWEEN)
|
||||
r = transition(from.red, to.red)
|
||||
g = transition(from.green, to.green)
|
||||
b = transition(from.blue, to.blue)
|
||||
@@ -51,4 +53,4 @@ module CyberarmEngine
|
||||
Math.sin(t) * t
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user