Exemplo n.º 1
0
        public void Load(ContentManager Content, string texture, int frameCount, int framesPerSec)
        {
            AnimatedTexture animation = new AnimatedTexture(Vector2.Zero, 0, scale, 1);

            animation.Load(Content, texture, frameCount, framesPerSec);
            sprite.Add(animation);
        }
Exemplo n.º 2
0
        public void Load(ContentManager Content)
        {
            AnimatedTexture animation = new AnimatedTexture(origin, rotation, Scale, 0f);

            switch (type)
            {
            case WeaponType.Dagger:
                animation.Load(Content, "Tile16", 1, 0);
                sprite.colour = Color.Cyan;
                break;

            case WeaponType.Sword:
                animation.Load(Content, "Tile16", 1, 0);
                sprite.colour = Color.DarkViolet;
                break;

            case WeaponType.Spear:
                animation.Load(Content, "Tile16", 1, 0);
                sprite.colour = Color.DeepPink;
                break;

            case WeaponType.Unarmed:
                animation.Load(Content, "Tile16", 1, 0);
                sprite.colour = Color.Transparent;
                break;
            }
            sprite.Clear();
            sprite.Add(animation, 0, 0);
        }
Exemplo n.º 3
0
        public void Load(ContentManager Content)
        {
            AnimatedTexture animation = new AnimatedTexture(origin, 0, scale, 1);

            animation.Load(Content, "tile32", 1, 1);
            sprite.Add(animation, 0, 0);
            sprite.colour = Color.Red;



            //weapon loading
            EquippedWeapon.type    = WeaponType.Unarmed;
            EquippedWeapon.oldType = WeaponType.Unarmed;
            EquippedWeapon.Initialise();
            EquippedWeapon.rotation = 0f;
            EquippedWeapon.Load(Content);
        }
Exemplo n.º 4
0
 public void Add(AnimatedTexture animation, int xOffset = 0, int yOffset = 0)
 {
     animations.Add(animation);
     animationOffsets.Add(new Vector2(xOffset, yOffset));
 }