public void CheckOffscreen() { var curPos = gameObject.transform.position; if (curPos.x > GameConfig.Right || curPos.x < GameConfig.Left || curPos.y > GameConfig.Top || curPos.y < GameConfig.Bottom) { gameController.DestroyBullet(gameObject); } }
public void CheckOffscreen() { var curPos = gameObject.transform.position; if (curPos.x > GameConfig.Right || curPos.x < GameConfig.Left || curPos.y > GameConfig.Top || curPos.y < GameConfig.Bottom) { gameController.DestroyBullet(gameObject); } }