79132837

Date: 2024-10-28 09:52:46
Score: 1.5
Natty:
Report link

using UnityEngine;

public class Bullet : MonoBehaviour { public float lifetime = 2f;

void Start()
{
    Destroy(gameObject, lifetime);
}

void OnCollisionEnter(Collision collision)
{
    // Add logic here for what happens when the bullet hits an object.
    Destroy(gameObject);
}

}

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Jerin