Hi I am currently designing a dungeon crawling game, where there's multiple worlds, each one being a room with enemies/powerups in them. I have designed multiple rooms, where currently walking into a door will trigger the user and door intersecting function and move them into another room, however with this design i have multiple door subclasses spawning the user in different rooms, also I have the worlds spawning the character into a specific place, for example if they walk in through the top of a room, they will spawn on the right due to another door leading on that side. How would I get them to spawn in a different place depending on the door they entered by? I would also like to avoid the multiple door sub classes by storing the whole map as an array for example something like 0,1,2 representing the map I have attached, but I'm just not sure how to do this. All help is appreciated! thanks.. 1,3,4
2,0,0
4,1,5
also if I have explained myself really badly then I apologise, I'll reply with a more specific explanation of what you don't understand.

