Exemple #1
0
    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);
            }
        }
    }
Exemple #2
0
 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());
 }
Exemple #3
0
    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);
 }