Beispiel #1
0
    public void Hook(GamePawn user, GamePawn target, Direction dir)
    {
        Tile     hookTile = target.GetTile().GetNeighbours(dir);
        Sequence s        = DOTween.Sequence();

        GameObject.Instantiate(anchor, user.transform.position + Vector3.up, Quaternion.identity);

        s.Append(anchor.transform.DOMove(target.transform.position + Vector3.up, .3f))
        .SetEase(Ease.Linear);

        //Play vertical Anim
        s.Append(target.transform.DOMove(hookTile.transform.position + new Vector3(0, hookTile.transform.localScale.y, 0), 0.3f)
                 .SetEase(Ease.Linear)
                 .OnComplete(() =>
        {
            target.GetTile().SetPawnOnTile(null);
            target.SetTile(hookTile);
        }));


        s.OnComplete(() =>
        {
            user.EndAction();
        });
    }
Beispiel #2
0
    public void LiftPawn(PlayerCharacter user, GamePawn target)
    {
        target.GetTile().SetPawnOnTile(null);
        target.SetTile(null);
        user.liftedPawn = target;

        user.BeginAction();

        Sequence s = DOTween.Sequence();

        s.Append(target.transform.DOMove(user.LiftPawnSocket.position, 0.3f))
        .SetEase(Ease.OutCubic);
        user.throwElementSkill.ThrowPreview(user, target);
    }
Beispiel #3
0
    public void Jump(GamePawn user, GamePawn target, Direction dir)
    {
        currentActiveSkill = null;
        Tile jumpTile = target.GetTile().GetNeighbours(dir);

        Highlight_Manager.instance.HideHighlight(user.GetSkillPreviewID());

        Sequence s = DOTween.Sequence();

        PlayerManager.instance.playerCharacter.anim.SetTrigger("Jump");
        s.Append(user.transform.DOMove(jumpTile.transform.position + new Vector3(0, jumpTile.transform.localScale.y, 0), 0.3f)
                 .SetEase(Ease.Linear)
                 .OnComplete(() =>
        {
            user.GetTile().SetPawnOnTile(null);
            user.SetTile(jumpTile);
        }));


        s.OnComplete(() =>
        {
            user.EndAction();
        });
    }