Пример #1
0
    private void Init()
    {
        BackToFolderView.interactable = false;
        BackToFolderView.onClick.AddListener(delegate
        {
            HideFileIcons();
            ShowFolderIcons();
            BackToFolderView.interactable = false;
        });
        LoadButton.onClick.AddListener(OpenLoadTab);
        ResumeButton.onClick.AddListener(GoBackToSim);

        if (ReplayComponent.GetIndex() == ReplayComponent.PopulationComponent.PopulationSize - 1)
        {
            RightArrow.interactable = false;
        }
        if (ReplayComponent.GetIndex() == 0)
        {
            LeftArrow.interactable = false;
        }
        LeftArrow.onClick.AddListener(delegate
        {
            ReplayComponent.ChangeCandidate(-1);
        });

        RightArrow.onClick.AddListener(delegate
        {
            ReplayComponent.ChangeCandidate(1);
        });
        SpeedSlider.value = speed;
        SpeedSlider.onValueChanged.AddListener(delegate {
            speed          = SpeedSlider.value;
            Time.timeScale = speed;
        });
    }