t-acheson / transport_game

educational transport game
3 stars 1 forks source link

Issue62 player interaction #64

Closed eoinmtreacy closed 8 months ago

eoinmtreacy commented 8 months ago

Can't merge this before issue59 (further abstracted Entity class)

Handling this in a very naive way for now, the space bar interrupt calls Player.interact()

Player.interact() iterates through every "interactable" Entitiy (currently just Node objects) and checks if the Player.rectangle overlaps any of them

If the number of Nodes increases dramatically, this will need be changed and likely use a interaction message handler interface, but I don't think we need to worry about this for now

eoinmtreacy commented 8 months ago

shame on me for branching from other branches