private void OnEnable() { switch (this.onEnableBehaviour) { case OnEnableBehaviour.Play: { ABSAnimationComponent component = base.GetComponent <ABSAnimationComponent>(); if ((Object)component != (Object)null) { component.DOPlay(); } break; } case OnEnableBehaviour.Restart: { ABSAnimationComponent component = base.GetComponent <ABSAnimationComponent>(); if ((Object)component != (Object)null) { component.DORestart(false); } break; } case OnEnableBehaviour.RestartFromSpawnPoint: this._requiresRestartFromSpawnPoint = true; break; } }
private void Update() { if (this._requiresRestartFromSpawnPoint) { this._requiresRestartFromSpawnPoint = false; ABSAnimationComponent component = base.GetComponent <ABSAnimationComponent>(); if (component != null) { component.DORestart(true); } } }