public Vector3 Shake()
    {
        //if (CLevelManager.Inst.IsStopTime())
        //{
        //    return Vector3.zero;
        //}
        //actualizar y borrar
        for (int i = _shakes.Count - 1; i >= 0; i--)
        {
            if (_shakes [i].isInfinite)
            {
                continue;
            }

//			Shake shake = _shakes [i];
//			_shakes[i].elapsedTime += Time.deltaTime;
            _shakes[i].AddDeltaTime(Time.deltaTime);

            if (_shakes [i].NormalTime() >= 1)
            {
                _shakes [i] = null;
                _shakes.RemoveAt(i);
            }
        }

        //calcular
        int   count       = 0;
        float shakeAmount = 0;

        for (int i = 0; i < _shakes.Count; i++)
        {
            Shake shake = _shakes [i];
            float t     = shake.NormalTime();

            shakeAmount += shake.intensity * (1 - t);
            count       += 1;
        }

        if (count != 0)
        {
            shakeAmount /= count;
        }

        Vector3 offset;

        if (_XYOnly)
        {
            offset = Random.insideUnitCircle;
        }
        else
        {
            offset = Random.insideUnitSphere;
        }

        _lastValue = offset * shakeAmount;
        return(offset * shakeAmount);
    }