public IEnumerator PlaySkillAni(Transform target, int duration = 0) { if (Ballistic) { yield break; } _playFinished = false; _duration = duration; LocateTo(target); if (_isOverTime) { if (!_parallelCor.Running) { StartCoroutine(_parallelCor.Execute()); } _parallelCor.Add(_WateToFinish()); } else { while (!_playFinished) { yield return(null); } } }
public void SetData(CharacterData data, int pos) { gameObject.SetActive(true); _data = data; _pos = pos; _oriPosition = _root.position; ChangeHpSliderValue(); ChangeMpSliderValue(); if (_parallelCor == null) { _parallelCor = new ParallelCoroutines(); } _parallelCor.Clear(); StartCoroutine(_parallelCor.Execute()); }
public void Init() { Dispose(); switch (_direction) { case MoveDirection.Horizontal: _startPos = -_processBar.GetComponent <RectTransform>().sizeDelta.x; break; case MoveDirection.Vertical: _startPos = -_processBar.GetComponent <RectTransform>().sizeDelta.y; break; } if (_speed < 0f) { _speed = -_speed; } _UpdateBar(0f); _parallelCor = new ParallelCoroutines(); StartCoroutine(_parallelCor.Execute()); }
private void Start() { _parallelCor.Add(_Main()); StartCoroutine(_parallelCor.Execute()); DontDestroyOnLoad(gameObject); }