AssemblyCSharp.Xylokey.Update C# (CSharp) Method

Update() public method

public Update ( ) : void
return void
        void Update()
        {
            if (_timer > 0 && Time.time > _timer + colliderDisableTime)
            {
                _timer = 0f;
                hittable = true;
            }

            if (Mathf.Abs(amp) < 0.5)
            {
                amp = 0f;
                hitTime = 0f;
            }
            else if (amp > 0)
            {
                amp -= hitAmplitudeDecay * Time.deltaTime;
                hitTime += Time.deltaTime;
            }

            else if (amp < 0)
            {
                amp += hitAmplitudeDecay * Time.deltaTime;
                hitTime += Time.deltaTime;
            }

            this.transform.localEulerAngles = new Vector3(amp * Mathf.Sin(hitTime * hitFrequency), 0f, 0f);
        }