예제 #1
0
        public Sprite(Animation animation)
        {
            Animation = animation;
            Body = new RotatableRectangleF(Animation.MaxDimensions);

            Flip = SpriteEffects.None;
            Tint = Color.White;
            FramesPerSecond = 30;

            if (Animation.Animations.Count == 1)
            {
                var keys = new string[1];
                Animation.Animations.Keys.CopyTo(keys, 0);
                Key = keys[0];
            }
        }
예제 #2
0
 public static void LoadContent(ContentManager content)
 {
     _animation = content.Load<Animation>("sprite/coin");
 }
예제 #3
0
 public static void LoadContent(ContentManager content)
 {
     _hitSound = content.Load<SoundEffect>("sfx/hit");
     _animation = content.Load<Animation>("sprite/slime");
     _hurtSound = content.Load<SoundEffect>("sfx/sword03");
 }