public void CharJumpFall()
 {
     if (!collision)
     {
         charakter.CharakterJumpFall();
     }
 }
Exemple #2
0
        public void DinoAnimation(Graphics g, SizeF cSize, int FrameCount)
        {
            GraphicsUnit units = GraphicsUnit.Pixel;



            if (FrameCount % 3 == 0 && !charakter.Space && !charakter.Jump)
            {
                if (animationIndex < 2)
                {
                    animationIndex += 1;
                }
                else if (animationIndex == 2)
                {
                    animationIndex = 0;
                }
            }

            Rectangle rectangle = new Rectangle(45 * animationIndex, 0, 43, 51);

            charakter.CharakterJumpFall();

            float y = charakter.Rect.Y;
            float x = charakter.Rect.X - 10;

            g.DrawImage(DinoAnimationImage, x, y, rectangle, units);
        }