示例#1
0
    public virtual void ChangeDirection()
    {
        if (action == CharacterActionsEnum.run)
        {
            RunEnd();
        }

        if (changeDirectionToBack)
        {
            moveToDirection3D.ChangeDirection(DirectionsChanges3D.RandomDirectionGrounded(moveToDirection3D.direction));
        }
        else
        {
            moveToDirection3D.ChangeDirection(DirectionsChanges3D.RandomDirectionGrounded90Degrees(moveToDirection3D.direction));
        }

        transform.position = new Vector3(Mathf.Round(transform.position.x), transform.position.y, Mathf.Round(transform.position.z));
    }
示例#2
0
    public virtual void PushStart()
    {
        doingSkill = true;
        animator.SetBool(hashAnimator.push, true);

        pushCube.StartPushing(this);

        moveToDirection3D.speed = pushSpeed;

        pushCubeMovement.ChangeDirection(moveToDirection3D.direction);
        pushCubeMovement.speed = pushSpeed;

        pushCubeMovement.StartMoving();
    }