Пример #1
0
 public MarioAnimation(Texture2D texture, TextureMap info)
 {
     this.Texture      = texture;
     this.row          = info.Row;
     this.column       = info.Column;
     this.frames       = info.FramesInRow;
     this.speed        = info.TimePerFrame;
     this.currentFrame = 0;
     this.counter      = 0;
 }
Пример #2
0
 public SMarioTansition(IPlayer player, Type newState, TextureMap newSprite)
 {
     this.oldAcceleration = player.Acceleration;
     this.oldVelocity     = player.Velocity;
     this.Player          = player;
     this.newState        = newState;
     Player.Acceleration  = Vector2.Zero;
     Player.Sprite        = new MarioAnimation(HUD.currentPlayer == 0 ? Textures.marioTransition : Textures.luigiTransition, newSprite);
     if (newSprite == Textures.bigSmallTransitionLeft || newSprite == Textures.bigSmallTransitionRight)
     {
         SoundPanel.PlaySoundEffect(Sound.pipeEffect);
     }
 }
Пример #3
0
        public static void LoadTextureMaps()
        {
            smallBigTransitionLeft  = new TextureMap(0, 11, 3, TRANSITION_FRAME_TIME);
            smallBigTransitionRight = new TextureMap(0, 0, 3, TRANSITION_FRAME_TIME);

            bigSmallTransitionLeft  = new TextureMap(0, 4, 3, TRANSITION_FRAME_TIME);
            bigSmallTransitionRight = new TextureMap(0, 7, 3, TRANSITION_FRAME_TIME);

            fireIdleTransitionRight        = new TextureMap(1, 0, 2, TRANSITION_FRAME_TIME);
            fireRunningTransitionRight     = new TextureMap(1, 2, 2, TRANSITION_FRAME_TIME);
            fireJumpingIdleTransitionRight = new TextureMap(1, 6, 2, TRANSITION_FRAME_TIME);
            fireJumpingTransitionRight     = new TextureMap(1, 6, 2, TRANSITION_FRAME_TIME);
            fireDuckingTransitionRight     = new TextureMap(1, 4, 2, TRANSITION_FRAME_TIME);

            fireIdleTransitionLeft        = new TextureMap(2, 0, 2, TRANSITION_FRAME_TIME);
            fireRunningTransitionLeft     = new TextureMap(2, 2, 2, TRANSITION_FRAME_TIME);
            fireJumpingIdleTransitionLeft = new TextureMap(2, 6, 2, TRANSITION_FRAME_TIME);
            fireJumpingTransitionLeft     = new TextureMap(2, 6, 2, TRANSITION_FRAME_TIME);
            fireDuckingTransitionLeft     = new TextureMap(2, 4, 2, TRANSITION_FRAME_TIME);

            smallRightClimbing     = new TextureMap(0, 6, 2, CLIMBING_FRAME_TIME);
            smallRightClimbingIdle = new TextureMap(0, 6);
            smallRightSwimming     = new TextureMap(0, 0, 6, SWIMMING_FRAME_TIME);
            smallRightSwimmingIdle = new TextureMap(0, 0);
            smallRightIdle         = new TextureMap(0, 8);
            smallRightWalking      = new TextureMap(0, 9, 3, WALKING_FRAME_TIME);
            smallRightRunning      = new TextureMap(0, 9, 3, RUNNING_FRAME_TIME);
            smallRightTurning      = new TextureMap(0, 12);
            smallRightJumping      = new TextureMap(0, 13);
            smallDead             = new TextureMap(0, 16);
            smallLeftJumping      = new TextureMap(0, 19);
            smallLeftTurning      = new TextureMap(0, 20);
            smallLeftRunning      = new TextureMap(0, 21, 3, RUNNING_FRAME_TIME);
            smallLeftWalking      = new TextureMap(0, 21, 3, WALKING_FRAME_TIME);
            smallLeftIdle         = new TextureMap(0, 24);
            smallLeftSwimming     = new TextureMap(0, 27, 6, SWIMMING_FRAME_TIME);
            smallLeftSwimmingIdle = new TextureMap(0, 27);
            smallLeftClimbing     = new TextureMap(0, 25, 2, CLIMBING_FRAME_TIME);
            smallLeftClimbingIdle = new TextureMap(0, 25);

            bigRightClimbing     = new TextureMap(1, 6, 2, CLIMBING_FRAME_TIME);
            bigRightClimbingIdle = new TextureMap(1, 6);
            bigRightSwimming     = new TextureMap(1, 0, 6, SWIMMING_FRAME_TIME);
            bigRightSwimmingIdle = new TextureMap(1, 0);
            bigRightIdle         = new TextureMap(1, 8);
            bigRightWalking      = new TextureMap(1, 9, 3, WALKING_FRAME_TIME);
            bigRightRunning      = new TextureMap(1, 9, 3, RUNNING_FRAME_TIME);
            bigRightTurning      = new TextureMap(1, 12);
            bigRightJumping      = new TextureMap(1, 13);
            bigRightDucking      = new TextureMap(1, 14);
            bigLeftDucking       = new TextureMap(1, 18);
            bigLeftJumping       = new TextureMap(1, 19);
            bigLeftTurning       = new TextureMap(1, 20);
            bigLeftRunning       = new TextureMap(1, 21, 3, RUNNING_FRAME_TIME);
            bigLeftWalking       = new TextureMap(1, 21, 3, WALKING_FRAME_TIME);
            bigLeftIdle          = new TextureMap(1, 24);
            bigLeftSwimming      = new TextureMap(1, 27, 6, SWIMMING_FRAME_TIME);
            bigLeftSwimmingIdle  = new TextureMap(1, 27);
            bigLeftClimbing      = new TextureMap(1, 25, 2, CLIMBING_FRAME_TIME);
            bigLeftClimbingIdle  = new TextureMap(1, 25);

            fireRightClimbing     = new TextureMap(2, 6, 2, CLIMBING_FRAME_TIME);
            fireRightClimbingIdle = new TextureMap(2, 6);
            fireRightSwimming     = new TextureMap(2, 0, 6, SWIMMING_FRAME_TIME);
            fireRightSwimmingIdle = new TextureMap(2, 0);
            fireRightIdle         = new TextureMap(2, 8);
            fireRightWalking      = new TextureMap(2, 9, 3, WALKING_FRAME_TIME);
            fireRightRunning      = new TextureMap(2, 9, 3, RUNNING_FRAME_TIME);
            fireRightTurning      = new TextureMap(2, 12);
            fireRightJumping      = new TextureMap(2, 13);
            fireRightDucking      = new TextureMap(2, 14);
            fireLeftDucking       = new TextureMap(2, 18);
            fireLeftJumping       = new TextureMap(2, 19);
            fireLeftTurning       = new TextureMap(2, 20);
            fireLeftRunning       = new TextureMap(2, 21, 3, RUNNING_FRAME_TIME);
            fireLeftWalking       = new TextureMap(2, 21, 3, WALKING_FRAME_TIME);
            fireLeftIdle          = new TextureMap(2, 24);
            fireLeftSwimming      = new TextureMap(2, 27, 6, SWIMMING_FRAME_TIME);
            fireLeftSwimmingIdle  = new TextureMap(2, 27);
            fireLeftClimbing      = new TextureMap(2, 25, 2, CLIMBING_FRAME_TIME);
            fireLeftClimbingIdle  = new TextureMap(2, 25);
        }