コード例 #1
0
        public void SetupAnimations()
        {
            // Build the animated sprite
            Dictionary<string, Animation> animations = new Dictionary<string, Animation>();
            animations.Add("Stand", new Animation(thisScene, thisScene.CrystalTexture, 48, 48, new int[] { 0, 1, 2, 3 }, 8f, true));

            sprite = new AnimatedSprite(thisScene, animations);
            sprite.PlayAnimation("Stand");
            sprite.Position = Position;
        }
コード例 #2
0
ファイル: EvilPlayer.cs プロジェクト: cmark89/InaneSubterra
        public void LoadAnimations()
        {
            Dictionary<string, Animation> playerAnimations = new Dictionary<string, Animation>();

            playerAnimations.Add("Stand", new Animation(thisScene, Texture, 48, 48, new int[] { 0 }, 10, true));
            playerAnimations.Add("Jump", new Animation(thisScene, Texture, 48, 48, new int[] { 1 }, 10, true));
            playerAnimations.Add("Fall", new Animation(thisScene, Texture, 48, 48, new int[] { 2 }, 10, true));
            playerAnimations.Add("Walk", new Animation(thisScene, Texture, 48, 48, new int[] { 3, 4, 5, 6, 7, 8 }, 10, true));
            playerAnimations.Add("Shoot", new Animation(thisScene, Texture, 48, 48, new int[] { 9 }, 10, true));

            sprite = new AnimatedSprite(thisScene, playerAnimations);
            sprite.Flipped = true;
            sprite.PlayAnimation("Stand");
        }
コード例 #3
0
ファイル: Player.cs プロジェクト: cmark89/InaneSubterra
        public void LoadPlayerAnimations()
        {
            Dictionary<string, Animation> playerAnimations = new Dictionary<string, Animation>();

            playerAnimations.Add("Stand", new Animation(thisScene, Texture, 48, 48, new int[] { 0 }, 10, true));
            playerAnimations.Add("Jump", new Animation(thisScene, Texture, 48, 48, new int[] { 1 }, 10, true));
            playerAnimations.Add("Fall", new Animation(thisScene, Texture, 48, 48, new int[] { 2 }, 10, true));
            playerAnimations.Add("Walk", new Animation(thisScene, Texture, 48, 48, new int[] { 3, 4, 5, 6, 7, 8 }, 10, true));
            playerAnimations.Add("Hurt", new Animation(thisScene, Texture, 48, 48, new int[] { 18 }, 10, true));
            playerAnimations.Add("Down", new Animation(thisScene, Texture, 48, 48, new int[] { 19 }, 10, true));

            sprite = new AnimatedSprite(thisScene, playerAnimations);
            sprite.Position = Position;

            sprite.PlayAnimation("Fall");
        }