Esempio n. 1
0
        public void LoadContent(GameContent Content, int npcIndex, int headIndex)
        {
            bodyAnimation         = new Animation(Content.GetNpcTexture(npcIndex), 0.15f, true);
            headAnimation         = new Animation(Content.GetHeadTexture(headIndex), 0.1f, false);
            headAnimation.IsStill = true;

            // Calculate bounds within texture size.
            int width  = (int)(bodyAnimation.FrameWidth * 0.4);
            int left   = (bodyAnimation.FrameWidth - width) / 2;
            int height = (int)(bodyAnimation.FrameWidth * 0.8);
            int top    = bodyAnimation.FrameHeight - height;

            localBounds = new Rectangle(left, top, width, height);
        }