Beispiel #1
0
    private void Move(int index)
    {
        SetIndex(index);
        var target = (Vector2)pads.Pads[index].transform.position;

        jumpTween = Go.to(transform, manager.jumpDuration, new GoTweenConfig().position(target).setEaseType(manager.jumpEaseType));
        jumpTween.setOnBeginHandler(tween =>
        {
            frogAnimator.speed = 1f;
            canClick           = false;
        });
        jumpTween.setOnCompleteHandler(tween =>
        {
            frogAnimator.speed = 0f;
            canClick           = true;
        });
    }
Beispiel #2
0
    private void Move(int index)
    {
        SetIndex(index);
        var target = (Vector2) pads.Pads[index].transform.position;

        jumpTween = Go.to(transform, manager.jumpDuration, new GoTweenConfig().position(target).setEaseType(manager.jumpEaseType));
        jumpTween.setOnBeginHandler(tween =>
        {
            frogAnimator.speed = 1f;
            canClick = false;
        });
        jumpTween.setOnCompleteHandler(tween =>
        {
            frogAnimator.speed = 0f;
            canClick = true;
        });
    }