예제 #1
0
    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);
        }
    }