Example #1
0
        public void Advance(ref Point3D p, int index)
        {
            if (m_Path?.Success == true)
            {
                var dirs = m_Path.Directions;

                if (index >= 0 && index < dirs.Length)
                {
                    int x = p.X, y = p.Y;

                    CalcMoves.Offset(dirs[index], ref x, ref y);

                    p.X = x;
                    p.Y = y;
                }
            }
        }
Example #2
0
        public void Advance(ref Point3D p, int index)
        {
            if (this.m_Path != null && this.m_Path.Success)
            {
                Direction[] dirs = this.m_Path.Directions;

                if (index >= 0 && index < dirs.Length)
                {
                    int x = p.X, y = p.Y;

                    CalcMoves.Offset(dirs[index], ref x, ref y);

                    p.X = x;
                    p.Y = y;
                }
            }
        }