Esempio n. 1
0
 public void clearBlocks(bool keepStoredData = false)
 {
     if (succesPopup.isAnimating() || failPopup.isAnimating())
     {
         return;
     }
     if (roadPlacer != null)
     {
         if (roadPlacer.isActive())
         {
             return;
         }
         roadPlacer.clearRoad();
     }
     succesPopup.OutAnimation();
     failPopup.OutAnimation();
     foreach (Block block in level.getBlocks())
     {
         block.setPos(null).setRotation(0);
         block.removeBlueprintPrefab();
     }
     level.clear();
     if (!keepStoredData)
     {
         level.saveToDevice("");
     }
 }