Open kellishouts opened 8 years ago
also hero has the hasItem()
function
also hero has the giveItem(item, receiver);
where receiver is any interactable object
i just added player.die()
which can happen anytime, and happens whenever life
goes down to 0
new functions that weren't in Spawn Hero 2
every Spawn method (pretty much ALL the code) must be wrapped inside this new function
inside of there, you can run any Spawn.something() function
everything that you spawn returns that thing! and you can call
.despawn()
on anything despawnableso
Despawnables
Interactable Sprites
you can define what happens when you interact with anything interactable using the
interact
property of the object.interactables can talk
you can give anything in your inventory (collectables) to anything interactable only if you have that item in your inventory!
you can check if that interactable has an item that you gave