Search Unity

Decorating rooms in a 2D array?

Discussion in 'Scripting' started by MELTPACK, Sep 25, 2021.

  1. MELTPACK

    MELTPACK

    Joined:
    Apr 7, 2017
    Posts:
    151
    So, I've got this 2D array of tiles. Each tile has a position variable, and a room index. I also have a list of rooms. Each room holds a list of coordinates correlating to the positions contained in the room.

    Now, My game is set in an office, so it'd make sense to have desks, drawers, fountains etc lining the walls. How can I implement this for each room? The room's aren't just square, they can be any shape at all.
     
  2. glgamesforfun

    glgamesforfun

    Joined:
    Apr 13, 2021
    Posts:
    149
    It's easier if you show us your script part for that :)