Exemplo n.º 1
0
 public OutObject AddObject(OutObject oo)
 {
     oo.ScaleX = this.Scale;
     oo.ScaleY = this.Scale;
     this.objects.Add(oo);
     return(oo);
 }
Exemplo n.º 2
0
        public OutObject AddObject(string spriteId, int s, int t, int w, int h)
        {
            OutObject oo = new OutObject(spriteId, new IntRect(s, t, w, h));

            oo.ScaleX = this.Scale;
            oo.ScaleY = this.Scale;
            this.objects.Add(oo);
            return(oo);
        }
Exemplo n.º 3
0
        public void SetAnimation(OutObject obj)
        {
            var sa = new SpriteAnimation();

            foreach (var frame in this.frames)
            {
                sa.AppendSprite(frame.frame, frame.offset, frame.duration, frame.sfx);
            }
            obj.AddAnimator(sa);
        }
Exemplo n.º 4
0
 public void DeleteObject(OutObject obj)
 {
     obj.ToBeDeleted = true;
     this.objects.Remove(obj);
 }