public static void LoadResources(ContentManager ContentArg)
        {
            Content = ContentArg;

            NameFont = Arial = ContentArg.Load<SpriteFont>("Arial");
            Skybox = ContentArg.Load<Texture2D>("Sky");

            GUI.CursorTexture = ContentArg.Load<Texture2D>("GUI/Cursor");
            GUI.Bar = ContentArg.Load<Texture2D>("GUI/Bar");
            GUI.WeaponChargeBar = ContentArg.Load<Texture2D>("GUI/WeaponChargeBar");

            // Worm spritesheet
            WormAnimationData = new AnimationData(ContentArg.Load<Texture2D>("Worm"));
            WormAnimationData.AddAnimation(15, 15, 1, 0);// Walk
            WormAnimationData.AddAnimation(15, 15, 10, 0.05f); // Move
            WormAnimationData.AddAnimation(12, 27, 2, 0); // Airbone 0 - going up, 1 - falling
            WormAnimationData.AddAnimation(15, 27, 7, 0.03f); // Jump
            WormAnimationData.AddAnimation(15, 27, 4, 0.05f); // Land
        }
Exemple #2
0
 public Animation(AnimationData SpriteSheet)
 {
     Data = SpriteSheet;
     SetAnimation(0);
 }