void Update() { GridVisible grid = GlobalSettings.Instance.Visible; CellBehavior _gc = gameObject.GetComponent <CellBehavior>(); if (_gc.x < grid.minimumX || _gc.x > grid.maximumX) { offscreen = true; } else if (_gc.y < grid.minimumY || _gc.y > grid.maximumY) { offscreen = true; } else { offscreen = false; } if (offscreen) { OutOfBounds(); } }
void Start() { gridV = new GridVisible(); }