Noah2610 / deathfloor

Work-in-progress Mega Man inspired game.
MIT License
2 stars 0 forks source link

Interactables #49

Closed Noah2610 closed 4 years ago

Noah2610 commented 4 years ago

Player can pickup consumables like health up and extra lives.

Noah2610 commented 4 years ago

Add Interactable and CanInteract components. CanInteract entities can interact with Interactable entities. Interactable entities can use the OnInteract event, which triggers when its interacted with.

Noah2610 commented 4 years ago

Working. Entity config example:

components: (
    // Make the entity interactable with the player.
    interactable: (),
),
events: {
    // Do something when the player interacts with this entity.
    OnInteract: Echo("You interacted with me!"),
},