private void Update()
    {
        if (!canMove)
        {
            return;
        }

        if (Input.GetMouseButton(0))
        {
            squeezeAnimation.Animate(squeezeMinScale, squeezeAnimationSpeed);
        }

        if (Input.GetMouseButtonDown(0))
        {
            swipeInput.MouseClickPosition = Input.mousePosition;
        }

        if (Input.GetMouseButtonUp(0))
        {
            swipeInput.MouseReleasePosition = Input.mousePosition;

            squeezeAnimation.Reset();
            RotateAndMove();
        }
    }
示例#2
0
    private IEnumerator CrashingAnimation()
    {
        while (!squeezeAnimation.HasAnimationCompleted)
        {
            squeezeAnimation.Animate(minScale, animationSpeed);
            yield return(null);
        }

        yield return(new WaitForSeconds(.25f));

        player.Die();
    }