Initial commit
This commit is contained in:
234 files changed
+85827
No files matched your search
@@ -0,0 +1,10 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class BulletCleanup : MonoBehaviour
|
||||
{
|
||||
void Update()
|
||||
{
|
||||
Vector3 screenPos = Camera.main.WorldToViewportPoint(transform.position);
|
||||
if (screenPos.x < 0f || screenPos.x > 1f || screenPos.y < 0f || screenPos.y > 1f) Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user