public override int TryAction(Transform target)
    {
        int check = base.TryAction(transform);

        if (check > 0)
        {
            if (_react)
            {
                _react.Ping(_id, _active);
            }
        }
        return(check);
    }
 protected override void Update()
 {
     base.Update();
     if (_check != _active)
     {
         _check = _active;
         if (_react && ((_match == 0 && !_active) || (_match == 1 && _active) || _match == 2))
         {
             _react.Ping(_id, _active);
         }
     }
     if (_sprites.Count > 1)
     {
         _sprite.sprite = _sprites[_active ? 1 : 0];
     }
 }
Esempio n. 3
0
 protected override void Update()
 {
     base.Update();
     if (_check != _active)
     {
         if (_timerHold < _timeHold)
         {
             _timerHold += Time.deltaTime;
         }
         else
         {
             _check = _active;
         }
         if (_react && (_condition == 0 && !_active) || (_condition == 1 && _active) || _condition == 2)
         {
             _react.Ping(_id, _active);
         }
     }
     else
     {
         _timerHold = 0f;
     }
 }