Lade till PickUps
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user