Exemplo n.º 1
0
        public void UpdateAnimations(GameTime gameTime)
        {
            Globals.players[id] = this;
            clipPlayer.update(gameTime.ElapsedGameTime, true, Matrix.Identity);
            if (lastAction != activity)
            {
                if (activity == Constants.WALKING)
                {
                    walk();
                }

                else if (activity == Constants.RUNNING)
                {
                    run();
                }

                else if (activity == Constants.STANDING)
                {
                    idle();
                }
                else if (activity == Constants.CROUCHING)
                {
                    crouchIdle();
                }
                else if (activity == Constants.CROUCHWALKING)
                {
                    crouchwalk();
                }
                else if (activity == Constants.DEAD)
                {
                    if (lastAction == Constants.WALKING || lastAction == Constants.RUNNING || lastAction == Constants.STANDING)
                    {
                        dieStanding();
                    }
                    else
                    {
                        dieCrouching();
                    }
                }
                lastAction = activity;
                if (clipPlayer.inRange(629, 629))
                {
                    deadFw();
                }
                else if (clipPlayer.inRange(469, 469))
                {
                    deadFc();
                }
            }
        }