// Update is called once per frame void Update() { if (mist && value < 1) { value += Time.deltaTime * 0.1f; Graph.SetInputFloat("Normal", value); Graph.SetInputFloat("Roughness", value); Graph.QueueForRender(); Graph.RenderSync(); } if (!mist && value > 0) { value -= Time.deltaTime * 0.1f; Graph.SetInputFloat("Normal", value); Graph.SetInputFloat("Roughness", value); Graph.QueueForRender(); Graph.RenderSync(); } }
// Update is called once per frame void Update() { if (IsDown && Graph.GetInputFloat("WaterLevel1") < 1) { value += Time.deltaTime * 0.7f; Graph.SetInputFloat("WaterLevel1", value); Graph.QueueForRender(); Graph.RenderSync(); } if (!IsDown && Graph.GetInputFloat("WaterLevel2") < 1) { value += Time.deltaTime * 0.7f; Graph.SetInputFloat("WaterLevel2", value); Graph.QueueForRender(); Graph.RenderSync(); } if (Input.GetButtonDown("Jump")) { ChangeBehavior(); } }