Пример #1
0
    public void SetFrame(int eaX, int eaY, bool reverse, float[] xyTchFrame)  // 2ea of [ x, y, x, y ]
    {
        bool    reverseInfo = reverse;
        Vector3 vecOri, vecMax; // 스크린 좌하/우상 좌표 가져오기. (월드 좌표계로 변환)

        muiCam.GetComponent <UICam> ().GetWorldPointsOfCurScreen(out vecOri, out vecMax);
        //Ag.LogDouble (" TileUITest ::     Screen World Points .. " + vecOri.LogWith ("world 1") +
        //              vecMax.LogWith ("world 2") + Ag.mgScrX.LogWith ("ScrX") + Ag.mgScrY.LogWith ("ScrY"));
        AgTile worldRect = new AgTile(vecOri, vecMax);

        Vector3 ll = new Vector3(worldRect.GetCodiFromOrigin(IsX: true, Ratio: xyTchFrame [0]),
                                 worldRect.GetCodiFromOrigin(IsX: false, Ratio: xyTchFrame [1]), 0),
                ur = new Vector3(worldRect.GetCodiFromOrigin(IsX: true, Ratio: xyTchFrame [2]),
                                 worldRect.GetCodiFromOrigin(IsX: false, Ratio: xyTchFrame [3]), 0),
                fll = new Vector3(worldRect.GetCodiFromOrigin(IsX: true, Ratio: xyTchFrame [4]),
                                  worldRect.GetCodiFromOrigin(IsX: false, Ratio: xyTchFrame [5]), 0),
                fur = new Vector3(worldRect.GetCodiFromOrigin(IsX: true, Ratio: xyTchFrame [6]),
                                  worldRect.GetCodiFromOrigin(IsX: false, Ratio: xyTchFrame [7]), 0);

        Ag.LogIntenseWord(" CuMiManager :: SetFrame At  " + fll.LogWith("Frame") + fur.LogWith("Frame"));

        mFrame       = new AgTile(null, eaX, eaY, fll, fur, mFrmOpt.optVert, reverseInfo);
        mTchArea     = new AgTile(mFrame, eaX, eaY, ll, ur, mFrmOpt.optVert, reverseInfo);
        mFrameLength = (Vector3.Scale((ll - ur), myDirect)).magnitude;

        Ag.LogIntenseWord("CuUiManager :: SetFrame  @ " + ll + " to " + ur + myDirect.LogWith("Dir") +
                          mFrameLength.LogWith("FrameLength") + mScreenLength.LogWith("ScreenLength"));
    }
Пример #2
0
    public UITileManager(int pX, int pY, AmBoxArea pRange, float pDiagDist, bool?pVert, string pName, UITouchManager pTouchMan,
                         bool reverse = false, bool pSwitchLock = false, bool pLimit2Inside = false, bool pEnableScrl = true) :
        base(pDiagDist, pVert, pTouchMan, pEnableScrl)
    {
        muiSwitchLock    = pSwitchLock;
        mName            = pName;
        muiWagu          = pRange;
        muiWagu.dicCell  = dicCell;
        muiWagu.myOption = muiOption;

        mTileObj = new AgTile(null, pX, pY, new Vector3(muiWagu.Container.Xmin, muiWagu.Container.Ymin, 0),
                              new Vector3(muiWagu.Container.Xmax, muiWagu.Container.Ymax, 0), pVert.Value, reverse);
        muiLimit2Inside = pLimit2Inside;
    }
Пример #3
0
    public AgTile(AgTile pContain, int eaX, int eaY, Vector3 llVec, Vector3 urVec, bool vert, bool reverse)
    {
        mFrame     = pContain;
        this.eaX   = eaX;
        this.eaY   = eaY;
        this.llVec = llVec;
        this.urVec = urVec;
        cenVec     = (llVec + urVec) * 0.5f;
        //(llVec.LogWith ("LL") + urVec.LogWith ("UR") + cenVec.LogWith ("CEN")).HtLog ();
        arrX     = new float[eaX + 1];
        arrY     = new float[eaY + 1];
        mVert    = vert;
        mReverse = reverse;

        Ag.LogIntenseWord(" AgTile::AgTile >>  Ea ( " + eaX + " / " + eaY + " ) >>  LLvect : " + llVec + ", URvect : " + urVec);

        Divide();
    }