Example #1
0
 // Empty contructor for initalising object
 public Tile()
 {
     tileType = TileType.Null;
             platformPos = PlatformPos.Middle;
             tile_neighbours = new Tile [8];
             enemySpawn = false;
             playerSpawn = false;
             atEdge = false;
             endPoint = false;
 }
Example #2
0
 private void SetSprite()
 {
     //If tile a platform
             if (state == 1) {
                     //If no tile above, make sprite grass edge
                     if (tile_neighbours [(int)Direction.Up] == null || tile_neighbours [(int)Direction.Up].state == 0) {
                             platformPos = PlatformPos.Center;
                     }
                     //if tile above a platform, make sprite middle sprite
                     if (tile_neighbours [(int)Direction.Up].state == alive) {
                             platformPos = PlatformPos.Middle;
                     }
             }
 }