Exemplo n.º 1
0
        public IAnimationFrame Clone()
        {
            AGSAnimationFrame clone = (AGSAnimationFrame)MemberwiseClone();

            clone.Sprite = Sprite.Clone();
            return(clone);
        }
		public AGSSingleFrameAnimation (ISprite sprite) : base(new AGSAnimationConfiguration { Loops = 1 },
			new AGSAnimationState(), 1)
		{
			AGSAnimationFrame frame = new AGSAnimationFrame (sprite) { Delay = -1 };
			Frames.Add (frame);
			Setup ();
		}
        public IAnimationFrame ToItem(AGSSerializationContext context)
        {
            var frame = new AGSAnimationFrame(Sprite.ToItem(context));

            //frame.SoundEmitter = Sound.ToItem(context);
            frame.Delay    = Delay;
            frame.MinDelay = MinDelay;
            frame.MaxDelay = MaxDelay;
            return(frame);
        }
Exemplo n.º 4
0
        public AGSSingleFrameAnimation(ISprite sprite) : base(new AGSAnimationConfiguration {
            Loops = 1
        },
                                                              new AGSAnimationState(), 1)
        {
            AGSAnimationFrame frame = new AGSAnimationFrame(sprite)
            {
                Delay = -1
            };

            Frames.Add(frame);
            Setup();
        }
Exemplo n.º 5
0
        private void addAnimationFrame(IImage image, AGSAnimation animation)
        {
            if (image == null)
            {
                return;
            }
            ISprite sprite = GetSprite();

            sprite.Image = image;
            AGSAnimationFrame frame = new AGSAnimationFrame(sprite);

            animation.Frames.Add(frame);
        }
Exemplo n.º 6
0
        private void addAnimationFrame (IImage image, AGSAnimation animation)
		{
			if (image == null) return;
			ISprite sprite = GetSprite ();
			sprite.Image = image;
			AGSAnimationFrame frame = new AGSAnimationFrame (sprite);
			animation.Frames.Add (frame);
		}