Beispiel #1
0
    public override void MoveController(Vector2 finalPlayerVelocity, bool isOnPlatform = false)
    {
        playerCollision.ManageObjectCollisions(ref finalPlayerVelocity, playerInputDirection);

        transform.Translate(finalPlayerVelocity);

        playerAnimation.SetFloat("moveSpeed", finalPlayerVelocity.x * playerMovementTargetSpeed);

        if (isOnPlatform)
        {
            playerCollision.collisionData.isCollidingBelow = true;
        }
    }
    public override void MoveController(Vector2 finalPlayerVelocity, bool isOnPlatform = false)
    {
        playerCollision.ManageObjectCollisions(ref finalPlayerVelocity, playerInputDirection);

        transform.Translate(finalPlayerVelocity);


        if (isOnPlatform)
        {
            playerCollision.collisionData.isCollidingBelow = true;
        }
    }