Пример #1
0
    public void RollOutImmediate()
    {
        if (RolledIn == true)
        {
            RolledIn = false;

            SetUnrolledAngle(unrolledAngle);

            BeforeRollOut?.Invoke(carpet);

            RollStateChanged?.Invoke(RolledIn, gameObject);
        }
    }
Пример #2
0
    public float RollOut(TaskIdentity rollOutIdentity = null)
    {
        SoundController.Current.PlayCarpetRollSound();
        SoundController.Current.Vibrate();

        float duration = 0;

        if (RolledIn == true)
        {
            rollingOut = true;

            RollOutIdentity = rollOutIdentity;

            duration = getTimeToRoll(0.1f, 0.5f, !RolledIn);

            BeforeRollOut?.Invoke(carpet);

            RollingCoroutine = RollEnumerator(duration, !RolledIn);

            StartCoroutine(RollingCoroutine);
        }
        return(duration);
    }