コード例 #1
0
    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();
        }
    }
コード例 #2
0
 void Start()
 {
     gridV = new GridVisible();
 }