Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int TileID
- {
- get { return BaseTiles.Count > 0 ? BaseTiles[0] : 0; }
- set
- {
- if (BaseTiles.Count > 0)
- BaseTiles[0] = value;
- else
- AddBaseTile(value);
- }
- }
- when setting we make sure there is at least one tile in the BaseTiles list and set it to the passed value. If there isn't, we create one with the passed value. Of course, we will need to add the AddBaseTile helper function to our MapCell class:
- public void AddBaseTile(int tileID)
- {
- BaseTiles.Add(tileID);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement