public void StartLevel()
    {
        Debug.Log("StartLevel");
        soundController.PlayArea1Music();
        imageList = techUI.GetList();
        imageList.Clean();
        firstWave = true;
        FurnaceController.enabled = true;
        Debug.Log(TransportableSpawners[0]);
        Debug.Log(TransportableSpawners[1]);
        ActivateItemSpawning(false);
        Debug.Log("Items are not spawning");
        SetConveyorSpeed(MaxInteriorConveyorSpeed, MaxExteriorConveyorSpeed);
        Debug.Log("ConveyorSpeed Max");
        StartCoroutine(SpawnFreshItems(FastItemSpawningTimeSeconds));
        StartCoroutine(StartLevelDialog(2));

        //FinishLevel();
    }
Exemple #2
0
    public void StartLevel()
    {
        _furnace.GenerateNewColorSequences(_possibleColors);

        if (_networkController.GetLocalRole() == GameController.Role.SecurityGuard)
        {
            SpawnObjects();
        }
        _soundController.PlayArea2Music();
        _techUI.GetList().Clean();

        _imageList = new GameObject().AddComponent <ImageLayout>();
        _imageList.SetBlurMaterial(_blurMaterial);
        _imageList.SetFontMaterial(_fontMaterial);
        _imageList.SetQuestion(_questionSprite);
        _imageList.SetCheckImage(_checkPrefabs);
        _imageList.GetComponent <RectTransform>().SetParent(_information.transform);
        _imageList.Font       = _font;
        _imageList.TextOffset = -75.0f;
        RectTransform rectTransform = _imageList.GetComponent <RectTransform>();

        rectTransform.sizeDelta        = new Vector2(430, 175);
        rectTransform.anchorMax        = new Vector2(0, 0);
        rectTransform.anchorMin        = new Vector2(0, 0);
        rectTransform.pivot            = new Vector2(0, 0);
        rectTransform.localScale       = new Vector3(0.2f, 0.2f, 0.2f);
        rectTransform.localPosition    = new Vector3(0, 0, 0);
        rectTransform.localRotation    = Quaternion.identity;
        rectTransform.anchoredPosition = new Vector2(0, 0);

        _timeLeft = LevelMaxAmountOfTimeSeconds;
        _currentSequenceFailed = false;
        //_imageList = _techUI.GetList();
        _imageList.Clean();
        setItemsImageList();
        _dialogSystem.StartDialog("Area02_start");
        _levelInProgress = true;
    }