private void Awake() { layoutBounds = LayoutBounds.GetLayoutBounds(); cam = Camera.main; halfHeight = cam.orthographicSize; halfWidth = halfHeight * Screen.width / Screen.height; }
private void Awake() { layoutBounds = LayoutBounds.GetLayoutBounds(); targetCollider = GetComponent <BoxCollider2D>(); if (targetCollider == null) { targetCollider = GetComponent <CircleCollider2D>(); } halfWidth = (targetCollider.bounds.max.x - targetCollider.bounds.min.x) * 0.5f; halfHeight = (targetCollider.bounds.max.y - targetCollider.bounds.min.y) * 0.5f; }
private void Awake() { layoutBounds = LayoutBounds.GetLayoutBounds(); }
private void Awake() { layoutBounds = LayoutBounds.GetLayoutBounds(); monstersRoot = GameObject.Find("Monsters").transform; }
private void Awake() { layoutBounds = LayoutBounds.GetLayoutBounds(); bulletMovement = GetComponent <BulletMovement>(); }