So I have 2 doors on this level, Door2 and Door 3. These doors are only meant to be accessible if the player has come into contact with the key "Key". The player is called Isaac. I am just not entirely sure how to use boolean. These doors currently are teleporting the player to xy's upon contact.
if (isTouching(Door2.class))
{
setLocation(16, 15);
}
if (isTouching(Door3.class))
{
setLocation(13, 15);
}
