void Update()
{
float xEingabe = Input.GetAxis(“Horizontal”);
float yEingabe = Input.GetAxis(“Vertical”);
if (yEingabe < 0)
{
return;
}
float xNeu = transform.position.x +
xEingabe * eingabeFaktor * Time.deltaTime;
if (xNeu > 8.3f)
{
xNeu = 8.3f;
}
if (xNeu < -8.3f)
{
xNeu = -8.3f;
}
float yNeu = transform.position.y +
yEingabe * eingabeFaktor * Time.deltaTime;
if (yNeu < -5)
{
yNeu = -4.4f;
}
transform.position = new Vector3(xNeu, yNeu, 0);
,