예제 #1
0
            /// <summary>
            /// Initializes animation components and resets variables.
            /// </summary>
            public static void Initialize()
            {
                position  = new Vector2(30, 30);
                animation = new ComplexAnimation()
                {
                    Scale = 4
                };
                ComplexAnimData normal = new ComplexAnimData(1, GameWorld.UiSpriteSheet, new Rectangle(), 80, 16, 16, 125, 4, true);
                ComplexAnimData dead   = new ComplexAnimData(1000, GameWorld.UiSpriteSheet, new Rectangle(), 96, 16, 16, 125, 4, true);
                ComplexAnimData poison = new ComplexAnimData(100, GameWorld.UiSpriteSheet, new Rectangle(), 64, 16, 16, 125, 4, true);

                animation.AddAnimationData("normal", normal);
                animation.AddAnimationData("dead", dead);
                animation.AddAnimationData("poison", poison);
                animation.AddToQueue("normal");
                fontBig   = ContentHelper.LoadFont("Fonts/x32");
                fontSmall = ContentHelper.LoadFont("Fonts/x16");
            }
예제 #2
0
 public Charlie(int x, int y)
 {
     ObeysGravity      = true;
     IsCollidable      = true;
     _complexAnimation = new ComplexAnimation();
     Texture           = ContentHelper.LoadTexture("Characters/NPCs/charlie");
     CollRectangle     = new Rectangle(x, y, 48, 80);
     SetPosition(new Vector2(x, y));
     _complexAnimation.AddAnimationData("still", new ComplexAnimData(1, Texture, new Rectangle(0, 0, 24, 40), 0, 24, 40, 500, 1, true));
     AddAnimationToQueue("still");
     TMBAW_Game.Dialog.NextDialog += Dialog_NextDialog;
 }
예제 #3
0
            /// <summary>
            /// Initializes animation components and resets variables.
            /// </summary>
            public static void Initialize()
            {
                position  = new Vector2(250, 30);
                animation = new ComplexAnimation()
                {
                    Scale = 4
                };
                ComplexAnimData normal = new ComplexAnimData(1, GameWorld.UiSpriteSheet, new Rectangle(), 112, 16, 16, 125, 8, true);

                animation.AddAnimationData("normal", normal);
                animation.AddToQueue("normal");
                fontBig   = ContentHelper.LoadFont("Fonts/x32");
                fontSmall = ContentHelper.LoadFont("Fonts/x16");
            }