Example #1
0
    private void Awake()
    {
        layoutBounds = LayoutBounds.GetLayoutBounds();

        cam        = Camera.main;
        halfHeight = cam.orthographicSize;
        halfWidth  = halfHeight * Screen.width / Screen.height;
    }
Example #2
0
    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();
 }
Example #4
0
 private void Awake()
 {
     layoutBounds = LayoutBounds.GetLayoutBounds();
     monstersRoot = GameObject.Find("Monsters").transform;
 }
Example #5
0
 private void Awake()
 {
     layoutBounds   = LayoutBounds.GetLayoutBounds();
     bulletMovement = GetComponent <BulletMovement>();
 }