コード例 #1
0
        public override bool onDirection(Direction d)
        {
            GridLoc orGLoc = currentIndex.clone();

            try {
                moveSelect(d);
                return(false);
            } catch (Exception e) {
                if (getNextTVBehaviourByDirection(d) != null)
                {
                    currentIndex = orGLoc;
                    return(true);
                }
                else if (!DirectionF.i(d).isVertical() && horizontalEndRepeatable)
                {
                    handleRepeatEnd(d);
                    return(false);
                }
                else if (DirectionF.i(d).isVertical() && verticalEndRepeatable)
                {
                    handleRepeatEnd(d);
                    return(false);
                }
                else
                {
                    return(handleOther(d, orGLoc, currentIndex));
                }
            }
        }
コード例 #2
0
 new public void Awake()
 {
     base.Awake();
     currentIndex = GridLoc.zero();
     gridLayout   = GetComponent <GridLayoutGroup>();
     rectTram     = GetComponent <RectTransform>();
 }
コード例 #3
0
 public void setCurrentSelected(GridLoc loc)
 {
     showCurrentSelected(false);
     currentIndex = loc;
     showCurrentSelected(true);
 }
コード例 #4
0
 public TvGrid get(GridLoc v)
 {
     return(gridMtx[v.y][v.x]);
 }
コード例 #5
0
 internal virtual bool handleOther(Direction d, GridLoc orGLoc, GridLoc _currentIndex)
 {
     currentIndex = orGLoc.clone();
     showCurrentSelected(true);
     return(true);
 }