Ejemplo n.º 1
0
 public void Dispose()
 {
     if (_parallelCor != null)
     {
         _parallelCor.Stop();
         _parallelCor = null;
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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());
 }
Ejemplo n.º 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());
    }