merhaba kodların neresinde hata var çözemedim? `using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour
{
Rigidbody2D playerRB;
public float moveSpeed = 1f;
bool facingRight = true;
void Awake()
{
}
// Start is called before the first frame update
void Start()
{
playerRB = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
playerRB.velocity = new Vector2(Input.GetAxis("Horizontal") * moveSpeed, playerRB.velocity.y);
if (playerRB.velocity.x < 0 && facingRight)
{
FlipFace();
}
else if (playerRB.velocity.x > && !facingRight)
{
FlipFace();
}
void FixedUpdate()
{
}
void HorizontalMove()
{
//playerRB.velocity = new Vector2(Input.GetAxis("Horizontal"),);
}
void FlipFace()
{
facingRight = !facingRight;
Vector3 tempLocalScale = transform.localScale;
tempLocalScale.x *= -1;
transform.localScale = tempLocalScale;
}
}
}
`