예제 #1
0
 public void OnPoolSpawned()
 {
     if (!_activeByDefault)
     {
         return;
     }
     _active  = true;
     _current = _targetAnimators.RandomElement();
     _current.Play();
 }
예제 #2
0
 public void OnSystemUpdate(float dt)
 {
     if (!_loop)
     {
         return;
     }
     if (_current != null && !_current.IsPlaying)
     {
         _current = _targetAnimators.RandomElement();
         _current.Play();
     }
 }
예제 #3
0
 public void LevelTrigger(ILevelTrigger origin)
 {
     if (_trigger == TriggerTargetTypes.None)
     {
         return;
     }
     if (_current == null)
     {
         _current = _targetAnimators.RandomElement();
         _current.Play();
     }
     else
     {
         _current = null;
     }
 }