예제 #1
0
    // Use this for initialization
    void Start()
    {
        evolution = GameObject.Find("Evolution").GetComponent <Evolution>();

        ErrorMessageColor = BCErrorMessage.color;
        savedLabelColor   = SavedLabel.color;

        showOneAtATimeToggle.isOn = evolution.Settings.showOneAtATime;
        showOneAtATimeToggle.onValueChanged.AddListener(delegate(bool arg0) {
            evolution.Settings.showOneAtATime = arg0;
            evolution.RefreshVisibleCreatures();
        });

        showMuscleContractionToggle.isOn = PlayerPrefs.GetInt(PlayerPrefsKeys.SHOW_MUSCLE_CONTRACTION, 0) == 1;
        showMuscleContractionToggle.onValueChanged.AddListener(delegate(bool arg0) {
            PlayerPrefs.SetInt(PlayerPrefsKeys.SHOW_MUSCLE_CONTRACTION, arg0 ? 1 : 0);
            PlayerPrefs.Save();
            evolution.RefreshVisibleCreatures();
            bcController.RefreshMuscleContractionVisibility();
        });

        timeScaleSlider.onValueChanged.AddListener(delegate(float arg0) {
            evolution.TimeScale = arg0;
            timeScaleLabel.text = arg0.ToString("0.0") + "X";
        });
    }
예제 #2
0
    public void ShowMuscleContractionDidChange(SimulationVisibilityOptionsView view, bool showMuscleContraction)
    {
        Settings.ShowMuscleContraction = showMuscleContraction;
        cameraFollowController.RefreshVisibleCreatures();

        bestCreatureController.RefreshMuscleContractionVisibility(Settings.ShowMuscleContraction);
    }