예제 #1
0
 private void AddFire(GridPoint point)
 {
     point.isOnFire = true;
     Instantiate(firePrefab, point.center, room.transform.rotation, this.transform);
     currentFirePositions.Add(point);
     foreach (GridPoint gridPoint in point.GetAllAdjacentGridPoints())
     {
         if (!adjacentGridPoints.Contains(gridPoint) && !gridPoint.isOnFire)
         {
             adjacentGridPoints.Add(gridPoint);
         }
     }
 }