|
- using System;
- using UnityEngine;
-
- namespace Tweening
- {
- public sealed class CanvasGroupInteractableTweenerTrack : TweenerTrack<CanvasGroup, bool>
- {
- public override void UpdateComponentValue(float evaluatedTime)
- {
- bool flag = Mathf.Approximately(Mathf.LerpUnclamped((!this._from) ? 0f : 1f, (!this._to) ? 0f : 1f, evaluatedTime), 1f);
- if (this._component.interactable != flag)
- {
- this._component.interactable = flag;
- }
- }
-
- public override void ResetComponentValue()
- {
- if (this._dynamicFrom)
- {
- this._from = this._component.interactable;
- }
- else if (this._component.interactable != this._from)
- {
- this._component.interactable = this._from;
- }
- }
-
- public override void InitializeComponentValue()
- {
- if (this._dynamicFrom)
- {
- this._from = this._component.interactable;
- }
- else if (this._component.interactable != this._from)
- {
- this._component.interactable = this._from;
- }
- }
- }
- }
|