title: making my player sprite land on top of my platform sprite
body: <p>in my XNA game(im fairly new to XNA by the way) i would like to have my player sprite land on top of a platform. i have a player sprite class that inherits from my regular sprite class, and the regular sprite class for 
  basic non playable sprite stuff such as boxes, background stuff, and platforms. However, i am unsure how to implement a way to make my player sprite land on a platform. </p>
  
  <p>My player Sprite can jump and move around, but i dont know where and how to check to see if it is on top of my platform sprite. </p>
  
  <p>My player sprites jump method is here</p>
  
  <pre><code> private void Jump()
      {
  
          if (mCurrentState != State.Jumping)
          {
  
              mCurrentState = State.Jumping;
  
  
              mStartingPosition = Position;
  
              mDirection.Y = MOVE_UP;
  
              mSpeed = new Vector2(jumpSpeed, jumpSpeed);
  
          }
  
      }
  </code></pre>
  
  <p>mStartingPosition is player sprites starting position of the jump, and Position is the player sprites current position. I would think that my code for checking to see whether my player sprite is on top of my platform sprite. I am unsure how to reference my platform sprite inside of the playersprite class and inside of the jump method.</p>
  
  <p>i think it should be something like this</p>
  
  <pre><code>   //platformSprite.CollisonBox would be the rectangle around the platform, but im not 
      //sure how to check to see if player.Position is touching any point     
      //on platformSprite.CollisionBox
  if(player.Position == platformSprite.CollisionBox)
      {
          player.mDirection = 0;
  
      }
  </code></pre>
  
  <p>Again im pretty new to programming and XNA, and some of this logic i dont quite understand so any help on any of it would be greatly appreciated:D </p>
  
  <p>Thanks </p>