diff --git a/src/main/java/br/com/abby/animation/Timeline.java b/src/main/java/br/com/abby/animation/Timeline.java index 4ddea77..82a6c54 100644 --- a/src/main/java/br/com/abby/animation/Timeline.java +++ b/src/main/java/br/com/abby/animation/Timeline.java @@ -5,7 +5,7 @@ import java.util.Map; import java.util.Set; -import examples.etyllica.interpolation.Interpolation; +import br.com.etyllica.core.interpolation.Interpolator; public class Timeline { @@ -15,7 +15,7 @@ public class Timeline { Map ids = new HashMap(); Map> actorFrames = new HashMap>(); - //Map interpolations = new HashMap(); + Map interpolators = new HashMap(); public int addActor(int index, T actor) { if(ids.containsKey(index)) { @@ -33,16 +33,16 @@ public Map addKeyFrame(Integer id, int time, KeyFrame keyFram return frames; } - public Map addKeyFrame(int id, int time, KeyFrame keyFrame, Interpolation interpolation) { + public Map addKeyFrame(int id, int time, KeyFrame keyFrame, Interpolator interpolator) { Map frames = addKeyFrame(id, time, keyFrame); - //addInterpolation(keyFrame.getId(), interpolation); + addInterpolation(keyFrame.getId(), interpolator); return frames; } - /*public void addInterpolation(long id, Interpolation interpolation) { - interpolations.put(id, interpolation); - }*/ + public void addInterpolation(long id, Interpolator interpolation) { + interpolators.put(id, interpolation); + } public Map getKeyFrames(T actor) { for(Map.Entry entry: ids.entrySet()) { @@ -70,9 +70,9 @@ public void removeActor(int index) { for(KeyFrame frame:frames.values()) { long id = frame.getId(); - /*if (interpolations.containsKey(id)) { - interpolations.remove(id); - }*/ + if (interpolators.containsKey(id)) { + interpolators.remove(id); + } } actorFrames.remove(index);