public void Dispose() { if (_parallelCor != null) { _parallelCor.Stop(); _parallelCor = null; } }
public void Init(SkillEffectViewType type, Transform transform, Action <SkillEffectView> disableAction, bool isOverTime = false, bool ballistic = false) { Type = type; _defaultRoot = transform; _onDisableAction = disableAction; Ballistic = ballistic; _isOverTime = isOverTime; if (isOverTime) { _parallelCor = new ParallelCoroutines(); } }
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()); }