Beispiel #1
0
 public void Dispose()
 {
     if (_parallelCor != null)
     {
         _parallelCor.Stop();
         _parallelCor = null;
     }
 }
Beispiel #2
0
 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();
     }
 }
Beispiel #3
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());
 }
Beispiel #4
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());
    }