using UnityEngine; public class BlockDrop_Bullet : MonoBehaviour { public float speed = 25f; public int damage = 1; public float life = 3f; void Start() { Destroy(gameObject, life); } void Update() { transform.position += transform.forward * speed * Time.deltaTime; } void OnTriggerEnter(Collider other) { if (other.TryGetComponent(out var block)) { block.Hit(damage); Destroy(gameObject); } } }