public void CheckBoxes()
  {
    Tile tile;
    tile = collider.collideWithSpBox(character, gameMap);
    if(tile!= null)
    {       
        //identifying the item
      if(tile.hasShroom())
      {
           bonus = AICharacter.createShroom(spriteLoader, character.getPosition().x, (character.getPosition().y)-70,"Shroom");
           TimeBonus.add(System.currentTimeMillis());
           tile.gotTheItem();
      }
      else if(tile.hasHpUp())
      {
          bonus = AICharacter.createHpUp(spriteLoader, character.getPosition().x, (character.getPosition().y)-70,"HpUp");
          TimeBonus.add(System.currentTimeMillis());
          tile.gotTheItem();
      }     
      //this has no gotTheItem() method cause it is called from collider.collidwithbonusbox() method
      else if(tile.hasMoney())
      {
          bonus = AICharacter.createMoney(spriteLoader, character.getPosition().x, (character.getPosition().y)-70,"Money");
          TimeBonus.add(System.currentTimeMillis());
      }
      else if(tile.hasStar())
      {
          bonus = AICharacter.createStar(spriteLoader, character.getPosition().x, (character.getPosition().y)-70,"star");
          TimeBonus.add(System.currentTimeMillis());
          tile.gotTheItem();
      }
      //adding the item to an array for drawing purposes
      bonuses.add(bonus);      
     }
  }