Ejemplo n.º 1
0
    public void Tick()
    {
        if (isPushing)
        {
            pushTimer += Time.deltaTime;
            if (pushTimer >= characterView.GetPushTime())
            {
                isPushing = false;
                characterView.ResetAnim();
            }
        }

        if (isFalling)
        {
            characterView.FallingTranslate(forceDir.x, forceDir.y);
            fallTimer += Time.deltaTime;
            if (fallTimer >= characterView.GetFallTime())
            {
                isFalling = false;
                characterView.ResetAnim();
            }
        }
    }