Exemplo n.º 1
0
        public T2Hero(Texture2D p_texture, int p_spritewidth, int p_spriteheight)
        {
            Velocity = new Vector2(200.0f, 0);

            Sprite = new PotatoSprite(this, p_texture, p_spritewidth, p_spriteheight);

            Sprite.AddAnimation("FRONT_IDLE", 0.3f, true, 1, new int[] { 0 });
            Sprite.AddAnimation("WALK_DOWN", 0.3f, true, 6, new int[] { 1, 2, 3, 4, 3, 2 });
            Sprite.AddAnimation("WALK_UP", 0.3f, true, 6, new int[] { 6, 7, 8, 9, 8, 7 });
            Sprite.AddAnimation("WALK_RIGHT", 0.3f, true, 6, new int[] { 15, 16, 17, 18, 17, 16 });
            Sprite.AddAnimation("WALK_LEFT", 0.3f, true, 4, new int[] { 10, 11, 12, 13 });
        }
Exemplo n.º 2
0
        public void ClassicSetup(Texture2D p_texture, int p_spritewidth, int p_spriteheight)
        {
            BoundingBox.Width  = (int)(p_spritewidth * 0.7f);
            BoundingBox.Height = (int)(p_spriteheight * 0.7f);

            BaseSprite = new PotatoSprite(this, p_texture, p_spritewidth, p_spriteheight);
            BaseSprite.AddAnimation("IDLE", 0.3f, false, 1, new int[] { 0 });
            BaseSprite.AddAnimation("UP", 0.3f, false, 1, new int[] { 1 });
            BaseSprite.AddAnimation("DOWN", 0.3f, false, 1, new int[] { 2 });

            BaseSprite.AddAnimation("EXPLOSION", 0.2f, false, 8, new int[] { 3, 4, 5, 6, 7, 8, 9, 10 });

            SetAnimation("IDLE");
        }
Exemplo n.º 3
0
        public void ClassicSetup(Texture2D p_texture, int p_spritewidth, int p_spriteheight, Vector2 p_posicao, float p_starttimer)
        {
            Posicao = p_posicao;

            BoundingBox.Width  = (int)(p_spritewidth * 1f);
            BoundingBox.Height = (int)(p_spriteheight * 1f);

            m_moveSequence.Add(new Vector2(280, 128));
            m_moveSequence.Add(new Vector2(374, 374));
            m_moveSequence.Add(new Vector2(1200, 374));


            BaseSprite = new PotatoSprite(this, p_texture, p_spritewidth, p_spriteheight);
            BaseSprite.AddAnimation("MOVE", 0.1f, true, 4, new int[] { 0, 1, 2, 3 });

            m_startTimer = new PotatoTimer(p_starttimer);

            SetAnimation("MOVE");
            MoveTo(m_moveSequence[moveindex], 0f, 2);
            moveindex++;
        }