Map generator durch bild ge fixt und playerController leicht überarbeitet

This commit is contained in:
2026-06-12 12:58:02 +02:00
parent 572cc5a8b0
commit 08259ffa44
5 changed files with 130 additions and 7 deletions
+4 -2
View File
@@ -31,13 +31,15 @@ public class Map_Generator : MonoBehaviour
{
GameObject block = Instantiate(blockPrefab);
block.transform.position = new Vector3(k, 0, i);
block.GetComponent<Renderer>().material.color = Random.ColorHSV();
block.GetComponent<Renderer>().material.color = Color.black;
}
}
}
}
void Update()
{
}
}
}
+7 -3
View File
@@ -5,19 +5,23 @@ using UnityEngine.UI;
public class PlayerController : MonoBehaviour
{
private int speed;
Vector3 position = Vector3.zero;
private Vector3 position = Vector3.zero;
private Text score;
private int points;
Rigidbody rb;
private Rigidbody rb;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
rb = GetComponent<Rigidbody>;
rb = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
position = Vector3.zero;
if (Input.GetKey(KeyCode.W))
{
}
}
}