Example #1
0
        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;
            }
        }
Example #2
0
 private void Update()
 {
     if (this._requiresRestartFromSpawnPoint)
     {
         this._requiresRestartFromSpawnPoint = false;
         ABSAnimationComponent component = base.GetComponent <ABSAnimationComponent>();
         if (component != null)
         {
             component.DORestart(true);
         }
     }
 }