예제 #1
0
 private void HandleAnimation(object o, AnimationTimerEventArgs e)
 {
     Texture         = TextureBank.GetTexture(textures[e.FrameIndex]);
     m_Bounds.Width  = Texture.Width;
     m_Bounds.Height = Texture.Height;
     Origin          = new Vector2(Texture.Width / 2, Texture.Height / 2);
 }
예제 #2
0
 private void HandleAnimation(object o, AnimationTimerEventArgs e)
 {
     switch (e.AnimationName)
     {
     case BlinkAnimationName:
         m_Texture = TextureBank.GetTexture(m_BlinkingTextures[e.FrameIndex]);
         break;
     }
 }
예제 #3
0
        private void AnimationHandler(object o, AnimationTimerEventArgs e)
        {
            switch (e.AnimationName)
            {
            case m_MoveHandsString:
                Vector2 amount = m_Direction;
                amount.Normalize();
                //in here i would move the hands a certain amount in the direction that they are moving
                //depending on which animation interval that im in
                switch (e.FrameIndex)
                {
                case 0:
                    amount *= 5;
                    break;

                case 1:
                    amount *= 10;
                    break;

                case 2:
                    amount *= 5;
                    break;

                case 3:
                    amount *= 10;
                    break;

                case 4:
                    amount *= 10;
                    break;
                }
                Lefthand.Move(amount, TimeSpan.FromSeconds(0));
                Righthand.Move(amount, TimeSpan.FromSeconds(0));
                break;
            }
        }
예제 #4
0
 private void HandlePlasmaHitAnimation(object o, AnimationTimerEventArgs e)
 {
     Texture = TextureBank.GetTexture(hitTextures[e.FrameIndex]);
 }