bool IsOutOfBounds() { SetupBounds sb = SetupBounds.instance; if (transform.position.x > sb.worldMax.x || transform.position.y > sb.worldMax.y || transform.position.x < sb.worldMin.x || transform.position.y < sb.worldMin.y) { return(true); } else { return(false); } }
void Awake () { transform = GetComponent<Transform>(); col = GetComponent<Collider2D>(); sb = SetupBounds.instance; }
void Awake() { transform = GetComponent <Transform>(); col = GetComponent <Collider2D>(); sb = SetupBounds.instance; }