Hi
If I understand your question correctly, yes absolutely. Wade just uses JavaScript, and in JavaScript you can add any property to any object,
You could do this in several different ways, it mainly depends on where you want to store your state. In your particular case, I'd do it this way: upon picking up the key (in the key's onClick function), store the state in the wade.app object so it's always available across different scenes:
wade.app.gotKey = true;
Then in the door's onClick function:
if (!wade.app.gotKey)
{
return;
}
In an adventure game you may want to have an inventory rather than storing the state of each object, so you'd set up an empty object when starting the game:
wade.app.inventory = {};
Then you'd store items in there as you pick them up:
wade.app.inventory.key = true;