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);

10
Assets/Scripts/Rotator.cs Normal file
View File

@@ -0,0 +1,10 @@
using UnityEngine;
public class Rotator : MonoBehaviour {
int speed = 5;
// Update is called once per frame
void Update() {
transform.Rotate(new Vector3(15, 30, 45) * (Time.deltaTime * speed));
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 71666496d30926049b05c2c8cff6330a