Пример #1
0
        private void HandleTileEffect()
        {
            if (!(_tileEffectDuration > 0))
            {
                return;
            }
            _tileEffectTimer += Time.deltaTime;

            if (!(_tileEffectTimer >= _tileEffectDuration))
            {
                return;
            }

            _tileEffect         = null;
            _tileEffectTimer    = 0;
            _tileEffectDuration = -1;
        }
Пример #2
0
 public void SetTileEffect(TileEffect tileEffect, float duration = -1)
 {
     _tileEffect         = tileEffect;
     _tileEffectDuration = duration;
     _tileEffectTimer    = 0;
 }