示例#1
0
    void OnTap(TapGesture gesture)
    {
        searchType = SearchPathType.TapToWalk;

        Vector3 interactPos = CameraHelper.ScreenPosToBackgroundPos(gesture.StartPosition);
        int     index       = m_pathGrid.GetCellIndex(interactPos);

        if (index == SimpleAI.Planning.Node.kInvalidIndex)
        {
            return;
        }
        int[] indexArray = new int[] { index };
        m_navigationAgent.MoveToIndex(indexArray);
    }