Lade till PickUps

This commit is contained in:
2026-03-25 21:23:33 +01:00
parent 4fe0094c21
commit da3a930c99
7 changed files with 1459 additions and 28 deletions

View File

@@ -1,3 +1,4 @@
using System;
using UnityEngine;
using UnityEngine.InputSystem;
public class BallController : MonoBehaviour {
@@ -19,6 +20,10 @@ public class BallController : MonoBehaviour {
CheckPlayerOut();
}
void OnTriggerEnter(Collider other) {
other.gameObject.SetActive(false);
}
void CheckPlayerOut() {
if (transform.position.y < outOfBounds) {
transform.position = new Vector3(0, 1f, 0);