Example #1
0
        // 발견된 매치 타일로 새로운 매치 정보 만들기
        private void makeMatch(MatchInfo findinfo, FindDirection dir, List <Tile> matchCandidates)
        {
            findinfo.isMatch = true;

            if (dir == FindDirection.Horizon)
            {
                findinfo.direction |= MatchDir.Horizon;
            }
            else
            {
                findinfo.direction |= MatchDir.Vertical;
            }

            foreach (var tile in matchCandidates)
            {
                if (tile.IsMatched == false)
                {
                    findinfo.AddTilePosition(tile.GetLocation());
                    tile.MarkFound();
                }
                else
                {
                    mergeMachedInfo(findinfo, tile);
                }
            }

            // 이 부분을 함수 바깥으로 뺄 수 있나?
            CheckRemover(findinfo);
        }
 internal static void AssetProperty(TextWriter var1, DateTimeOffset caller, FindDirection role, string cfg2, CultureInfo cont3)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(cfg2))
     {
         char[] array = new char[64];
         int    count = ConcatProperty(array, 0, (role == (FindDirection)0) ? caller.DateTime : caller.UtcDateTime, caller.Offset, DateTimeKind.Local, role);
         var1.Write(array, 0, count);
     }
     else
     {
         var1.Write(caller.ToString(cfg2, cont3));
     }
 }
 internal static void TestProperty(TextWriter info, DateTime token, FindDirection state, string init2, CultureInfo res3)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(init2))
     {
         char[] array = new char[64];
         int    count = ConcatProperty(array, 0, token, null, token.Kind, state);
         info.Write(array, 0, count);
     }
     else
     {
         info.Write(token.ToString(init2, res3));
     }
 }
Example #4
0
 private void Start()
 {
     addedAngle        = Vector3.SignedAngle(realCamera.transform.forward, transform.forward, Vector3.up);
     realFindDirection = realCamera.GetComponent <FindDirection>();
     controlled        = realCamera.GetComponent <ControlledCamera>();
 }
Example #5
0
 internal static extern bool XmTextFindString(IntPtr widget, long start,
         [MarshalAs(UnmanagedType.LPStr)] string xstring, FindDirection direction,[Out] out long position);
Example #6
0
 public int Find(string find, int offset, FindDirection direction)
 {
     long ret = -1;
     bool r = NativeMethods.XmTextFindString(this.NativeHandle.Widget, (long)offset, find, direction, out ret);
     if (true != r) {
         return -1;
     }
     return (int)ret;
 }
Example #7
0
 public bool Find(string find, int offset, FindDirection direction, TextPosition pos)
 {
     long ret = -1;
     bool r = NativeMethods.XmTextFindString(this.NativeHandle.Widget, (long)offset, find, direction, out ret);
     if (true != r) {
         return false;
     }
     short x, y;
     NativeMethods.XmTextPosToXY(this.NativeHandle.Widget, ret, out x, out y);
     pos.X = x;
     pos.Y = y;
     pos.Position = (int)ret;
     return r;
 }
        internal static int CountProperty(char[] param, int insert_PREDAt, TimeSpan helper, FindDirection pred2)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            param[insert_PREDAt++] = ((helper.Ticks >= 0) ? '+' : '-');
            int flagsfield = Math.Abs(helper.Hours);

            PrintProperty(param, insert_PREDAt, flagsfield, 2);
            insert_PREDAt += 2;
            if (pred2 == (FindDirection)0)
            {
                param[insert_PREDAt++] = ':';
            }
            int flagsfield2 = Math.Abs(helper.Minutes);

            PrintProperty(param, insert_PREDAt, flagsfield2, 2);
            insert_PREDAt += 2;
            return(insert_PREDAt);
        }
        internal static int ConcatProperty(char[] value, int start_cust, DateTime c, TimeSpan?asset2, DateTimeKind setup3, FindDirection token4)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            int num = start_cust;

            if (token4 == (FindDirection)1)
            {
                TimeSpan timeSpan = asset2 ?? c.AwakeProperty();
                long     num2     = ResetProperty(c, timeSpan);
                "\\/Date(".CopyTo(0, value, num, 7);
                num += 7;
                string text = num2.ToString(CultureInfo.InvariantCulture);
                text.CopyTo(0, value, num, text.Length);
                num += text.Length;
                switch (setup3)
                {
                case DateTimeKind.Unspecified:
                    if (c != DateTime.MaxValue && c != DateTime.MinValue)
                    {
                        num = CountProperty(value, num, timeSpan, token4);
                    }
                    break;

                case DateTimeKind.Local:
                    num = CountProperty(value, num, timeSpan, token4);
                    break;
                }
                ")\\/".CopyTo(0, value, num, 3);
                num += 3;
            }
            else
            {
                num = InvokeProperty(value, num, c);
                switch (setup3)
                {
                case DateTimeKind.Local:
                    num = CountProperty(value, num, asset2 ?? c.AwakeProperty(), token4);
                    break;

                case DateTimeKind.Utc:
                    value[num++] = 'Z';
                    break;
                }
            }
            return(num);
        }
Example #10
0
        void FindMatch(int row, int col, MatchInfo findinfo, FindDirection dir)
        {
            int             num = 0;
            compareTile     compareTile1;
            compareTile     compareTile2;
            getNeighborTile getTile1;
            getNeighborTile getTile2;

            if (dir == FindDirection.Horizon)
            {
                num          = _gamepanel.NumCol - 1;
                compareTile1 = _gamepanel.IsSameLeft;
                compareTile2 = _gamepanel.IsSameRight;
                getTile1     = _gamepanel.GetLeftTile;
                getTile2     = _gamepanel.GetRightTile;
            }
            else
            {
                num          = _gamepanel.NumRow - 1;
                compareTile1 = _gamepanel.IsSameUp;
                compareTile2 = _gamepanel.IsSameDown;
                getTile1     = _gamepanel.GetUpTile;
                getTile2     = _gamepanel.GetDownTile;
            }

            List <Tile> matchCandidates = new List <Tile>(); // 매치 확인을 위해 임시로 저장
            bool        bStopLeft       = false;
            bool        bStopRight      = false;

            for (int i = 0; i < num; i++)
            {
                if (!bStopLeft && compareTile1(row, col, i))
                {
                    matchCandidates.Add(getTile1(row, col, i));
                }
                else if (bStopRight)
                {
                    break;
                }
                else
                {
                    bStopLeft = true;
                }

                if (!bStopRight && compareTile2(row, col, i))
                {
                    matchCandidates.Add(getTile2(row, col, i));
                }
                else if (bStopLeft)
                {
                    break;
                }
                else
                {
                    bStopRight = true;
                }
            }

            if (matchCandidates.Count >= 2)
            {
                makeMatch(findinfo, dir, matchCandidates);
            }
            matchCandidates.Clear();
        }
Example #11
0
 public FindRequest(string findText, FindDirection direction, bool matchCase)
 {
     Text      = findText;
     Direction = direction;
     MatchCase = matchCase;
 }
Example #12
0
 // Start is called before the first frame update
 void Start()
 {
     direction     = new Vector3(0.0f, 0.0f, 0.0f);
     directionGame = new Vector3(0.0f, 0.0f, 0.0f);
     findDirection = GetComponent <FindDirection>();
 }