示例#1
0
        public void Approach(int moveDistance)
        {
            int[] source = GetComponent <MetaInfo>().Position;
            int   move   = Math.Min(moveDistance, Distance);

            int[][] path = GetComponent <NPCFindPath>().GetPath(source, move);

            foreach (int[] p in path)
            {
                GetComponent <LocalManager>().SetPosition(p);
                GetComponent <LocalManager>().TakenAction(ActionTag.NPCFindPath);
            }

            TileOverlay to = GameCore.AxeManCore.GetComponent <TileOverlay>();

            to.TryHideTile(source);
            to.TryHideTile(path.Last());
        }