Wie man feindlich schießen lässt
// Some Attribute
public float fireRate = 0.5f;
private float nextFire = 0.0f;
// In Update
if(Time.time > nextFire) {
if(!Bullet)
return;
nextFire = Time.time + fireRate;
GameObject clone = Instantiate(Bullet, ShootPoint.position,ShootPoint.rotation);
Rigidbody rb = clone.GetComponent<Rigidbody>();
rb.AddRelativeForce(Vector3.forward * bulletSpeed, ForceMode.Impulse);
}
MR. AARON And HEROSE