Example #1
0
    void Start()
    {
        loader = GetComponent <LoadingController>();
        loader.CreateSlots();

        ui = FindObjectOfType <BattleUI>();

        if (LevelSettings.GetStructureOfPieces() == null)
        {
            ui.ShowLoading(true);
            LoadSlot(loader.GetCurrentSlot());
        }
        else
        {
            ShowStartDialog();
        }
    }
Example #2
0
 private void OnEnable()
 {
     if (LevelSettings.GetStructureOfPieces() != null)
     {
         random.isOn       = LevelSettings.isLevelRandomOn;
         firstIsEmpty.isOn = LevelSettings.firstPieceIsEmpty;
         pieces            = LevelSettings.GetStructureOfPieces().levels;
         UpdateView();
         if (AreAllDeselected(pieces))
         {
             SelectAll();
         }
     }
     else
     {
         gameObject.SetActive(false);
     }
 }