BlenderBullet added to the Game // partical Effekts added // On Collision Bullets despawn

This commit is contained in:
klikev
2024-06-16 21:54:47 +02:00
parent f6ae544c3a
commit 49a5d6cc6a
11 changed files with 5366 additions and 47 deletions

View File

@@ -1,5 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
public class BulletScript : MonoBehaviour
@@ -26,6 +28,10 @@ public class BulletScript : MonoBehaviour
direction = hit.point - transform.position;//Richtung in die, die Kugel fliegt
}
}
private void OnCollisionEnter(Collision collision){
Debug.Log(collision.gameObject.name);
GameObject.Destroy(this.gameObject);
}
// Start is called before the first frame update
void Start()
{

View File

@@ -13,5 +13,5 @@ MonoBehaviour:
m_Name: DataBullet
m_EditorClassIdentifier:
damage: 10
speed: 10
speed: 20
ammo: 4