public SpriteAC(Object2D objectReference, double startTime, byte animationIndex) { this.objectReference = objectReference; this.animationIndex = animationIndex; this.animationLength = 0; this.animationStartTime = startTime; }
public TintAC(Object2D objectReference, double animationLength, double startTime, Color startColor, Color endColor) { this.objectReference = objectReference; this.animationLength = animationLength; this.animationStartTime = startTime; this.startColor = startColor; this.endColor = endColor; }
public TranslationAC(Object2D objectReference, double animationLength, double startTime, DiscreteVector2 start, DiscreteVector2 finish) { this.objectReference = objectReference; this.animationLength = animationLength; this.animationStartTime = startTime; Stopped = false; this.start = start; this.finish = finish; }
public SpriteAC(Object2D objectReference, double startTime, byte animationIndex, byte animationFrames, float animationSpeed) { this.objectReference = objectReference; this.animationIndex = animationIndex; this.animationFrames = animationFrames; this.animationSpeed = animationSpeed; this.animationLength = 0; this.animationStartTime = startTime; }
//private bool drawLater = false; public Object2D(Drawable drawable, int x, int y, Object2D child = null) { position = new DiscreteVector2(x, y); animator = new Animator(); childObjects = new List <Object2D>(); if (child != null) { childObjects.Add(child); } this.drawable = drawable; tintColor = Color.White; }
public void AddTransition(Object2D objectReference, double animationLength, double startTime, int x, int y) { animationSequence.Add(new TranslationAC(objectReference, animationLength, startTime, new DiscreteVector2(objectReference.position), new DiscreteVector2(objectReference.position.X + x, objectReference.position.Y + y))); }
public void AddTransition(Object2D objectReference, double animationLength, double startTime, DiscreteVector2 start, DiscreteVector2 finish) { animationSequence.Add(new TranslationAC(objectReference, animationLength, startTime, start, finish)); }
public void AddSprite(Object2D objectReference, double startTime, byte animationIndex) { animationSequence.Add(new SpriteAC(objectReference, startTime, animationIndex)); }
public void AddTint(Object2D objectReference, double animationLength, double startTime, bool fadeOut) { animationSequence.Add(new TintAC(objectReference, animationLength, startTime, new Color(0, 0, 0, 0), new Color(255, 255, 255, 255))); }
public void AddTint(Object2D objectReference, double animationLength, double startTime, Color startColor, Color endColor) { animationSequence.Add(new TintAC(objectReference, animationLength, startTime, startColor, endColor)); }
public void AddTextureChild(Object2D child, int index) { child.position = drawable.GetChildPosition(index); childObjects.Add(child); }
public void AddChild(Object2D child) { childObjects.Add(child); }