Ejemplo n.º 1
0
 public SpriteAC(Object2D objectReference, double startTime, byte animationIndex)
 {
     this.objectReference    = objectReference;
     this.animationIndex     = animationIndex;
     this.animationLength    = 0;
     this.animationStartTime = startTime;
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 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;
 }
Ejemplo n.º 5
0
        //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;
        }
Ejemplo n.º 6
0
 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)));
 }
Ejemplo n.º 7
0
 public void AddTransition(Object2D objectReference, double animationLength, double startTime, DiscreteVector2 start, DiscreteVector2 finish)
 {
     animationSequence.Add(new TranslationAC(objectReference, animationLength, startTime, start, finish));
 }
Ejemplo n.º 8
0
 public void AddSprite(Object2D objectReference, double startTime, byte animationIndex)
 {
     animationSequence.Add(new SpriteAC(objectReference, startTime, animationIndex));
 }
Ejemplo n.º 9
0
 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)));
 }
Ejemplo n.º 10
0
 public void AddTint(Object2D objectReference, double animationLength, double startTime, Color startColor, Color endColor)
 {
     animationSequence.Add(new TintAC(objectReference, animationLength, startTime, startColor, endColor));
 }
Ejemplo n.º 11
0
 public void AddTextureChild(Object2D child, int index)
 {
     child.position = drawable.GetChildPosition(index);
     childObjects.Add(child);
 }
Ejemplo n.º 12
0
 public void AddChild(Object2D child)
 {
     childObjects.Add(child);
 }