示例#1
0
文件: Hand.cs 项目: Tioboon/QuarkRush
    public IEnumerator MoveLeft()
    {
        for (int i = 0; i < 10; i++)
        {
            holdingRigidBody.velocity += (-Vector2.right * velocityMod);
        }
        if (isHoldingNumber != 999)
        {
            if (!doMortal)
            {
                _playerAnimations.ChangeToBack();
            }
        }

        velocityMod -= velocityModModifier;

        yield return(new WaitForSeconds(applyForceTimeExec));

        if (velocityMod <= 0)
        {
            StopAllCoroutines();
            goingLeft   = false;
            velocityMod = initVelocityMod;
        }
        if (goingLeft)
        {
            StartCoroutine(MoveLeft());
        }
    }