TimeOfDayManager.Update C# (CSharp) Méthode

Update() public méthode

public Update ( ) : void
Résultat void
    public void Update()
    {
        if (CrossPlatformInputManager.GetButtonDown("AutoTimeOfDay")) {
            autoCycleTime = !autoCycleTime;
        }
        //autoCycleTimeToggle.isOn = autoCycleTime;
        if (CrossPlatformInputManager.GetButton("TimeReverse")) {
            SetTime(time - 0.005f);
        }
        if (CrossPlatformInputManager.GetButton("TimeAdvance")) {
            SetTime(time + 0.005f);
        }
        if (CrossPlatformInputManager.GetButton("SpeedDown")) {
            if (speedSlider != null) speedSlider.value -= 0.025f;
            ChangeSpeed();
        }
        if (CrossPlatformInputManager.GetButton("SpeedUp")) {
            if (speedSlider != null) speedSlider.value += 0.025f;
            ChangeSpeed();
        }
        if (Application.isPlaying && !animationControl) if (autoCycleTime) SetTime(time + Time.deltaTime/cycleTime);
    }