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