BlenderBullet added to the Game // partical Effekts added // On Collision Bullets despawn
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
@@ -13,5 +13,5 @@ MonoBehaviour:
|
||||
m_Name: DataBullet
|
||||
m_EditorClassIdentifier:
|
||||
damage: 10
|
||||
speed: 10
|
||||
speed: 20
|
||||
ammo: 4
|
||||
|
Reference in New Issue
Block a user