großer fehler

This commit is contained in:
2026-08-20 11:15:06 +02:00
parent 2e3688fa38
commit abe59525e2
8 changed files with 104 additions and 117 deletions
+1 -1
View File
@@ -27,9 +27,9 @@ public class ARBullet : MonoBehaviour
if (enemy != null)
{
enemy.TakeDamage(damage);
Destroy(gameObject);
}
Destroy(gameObject);
}
else if(collision.gameObject.tag == "Wall")
{
+1
View File
@@ -1,3 +1,4 @@
//Oliver
using UnityEngine;
public class EnemyHealth : MonoBehaviour
+10 -2
View File
@@ -14,15 +14,24 @@ public class Shoot : MonoBehaviour
void Start()
{
<<<<<<< HEAD
=======
if (weapon == null)
weapon = FindFirstObjectByType<WeaponReload>();
>>>>>>> 85ece045864c59c50ed55097c35e2c15b9051a0f
}
void Update()
{
<<<<<<< HEAD
if (AR == true && Input.GetKey(KeyCode.Mouse0))
=======
if (PauseMenu.GameIsPaused) return;
if (AR == true && Input.GetKey(KeyCode.Mouse0) && Time.time >= nextShotTime)
>>>>>>> 85ece045864c59c50ed55097c35e2c15b9051a0f
{
Shot(spawnPointAR);
nextShotTime = Time.time + fireRate;
@@ -37,7 +46,6 @@ public class Shoot : MonoBehaviour
if (spawnPoint == null || weapon == null || !weapon.UseAmmo()) return;
GameObject bullet = Instantiate(bulletPrefab, spawnPoint.position, spawnPoint.rotation);
bullet.transform.Rotate(90,0,0);
Destroy(bullet, 2);
bullet.transform.Rotate(90, 0, 0);
}
}