Example #1
0
 public void UpdateList(int unlockMaxChapterID, int passMaxChapterID)
 {//i[0]为默认章节
     Clear();
     for (int i = 0; i < _mainCount; i++)
     {//判断每个章节是否已经解锁
         ChapterItem ci = Instantiate(item).GetComponent <ChapterItem>();
         chapterItems.Add(ci);
         //敬请期待
         if (i == _mainCount - 1)
         {
             SetParent(ci.gameObject.transform, scrollRect.content);
             //SetParent(ci.gameObject.transform, loop.content);
             ci.Set(998, $"敬请期待", $"敬请期待", null, false, false, false, false, 9999, UnlockChapter);
             return;
         }
         var section = StaticData.configExcel.GetSectionBySectionId(StaticData.configExcel.Section[0].SectionId + i);
         //是否显示为解锁状态      配置表里的章节id与服务器记录的最大解锁章节id 比较
         bool isUnlock = section.SectionId <= unlockMaxChapterID || section.SectionGrade <= StaticData.GetPlayerLevelByExp() ? true : false;
         //已解锁章节ID必定 >= 已通过章节ID
         //是否观看完毕           配置表里的章节id与服务器记录的最大已观看章节id 比较
         bool isWatchOver       = section.SectionId <= passMaxChapterID ? true : false;
         bool isBeforeUnlock    = section.SectionId - 1 <= unlockMaxChapterID ? true : false;
         bool isBeforeWatchOver = section.SectionId <= passMaxChapterID + 1 || section.SectionId == StaticData.configExcel.Section[0].SectionId ? true : false;
         //设置Item基础属性
         ci.Set(section.SectionId, ChapterTool.GetChapterFunctionString(section.SectionNumber), ChapterTool.GetChapterFunctionString(section.SectionNameId), section.Icon, isUnlock, isWatchOver, isBeforeUnlock, isBeforeWatchOver, section.SectionGrade, UnlockChapter);
         SetParent(ci.gameObject.transform, scrollRect.content);
         ci.name = $"Chapter{i}";
     }
 }
Example #2
0
    /// <summary>
    /// 点击背景
    /// </summary>
    public override async UniTask ClickBtn()
    {
        base.ClickBtn();

        if (_isPrinTing)
        {
            if (!_cancellationTokenSource.Token.IsCancellationRequested)
            {
                _cancellationTokenSource.Cancel();
            }

            _showText.text = ChapterTool.GetDialogueString(_dialogueData._Data);
            ShowEnd();
        }
        else
        {
            if (_isEnd)
            {
                _endAction?.Invoke();
            }
            else
            {
                SetDialogType(_dialogueData._Data);

                string dialogueNameData = ChapterTool.GetChapterFunctionString(_dialogueData._Data.NameID);
                await ShowStr(ChapterTool.GetDialogueString(_dialogueData._Data), dialogueNameData);
            }
        }
    }
Example #3
0
 void ReadOverThisChapter()
 {
     nextText.text = ChapterTool.GetChapterFunctionString(10000000);//下一章
     nextBtn.gameObject.SetActive(true);
     ChapterModuleManager._Instance.ClickEndChapterBtn(nextBtn, NextStep);
     //条漫阅读结束后即刻请求保存读完
     ChapterModuleManager._Instance.RequestPassChapter();
 }
Example #4
0
 void ShowInfo()
 {
     QRCode_name_text.text   = ChapterTool.GetChapterFunctionString(10000005);
     QRCode_region_text.text = ChapterTool.GetChapterFunctionString(10000537);
     name_text.text          = ChapterTool.GetChapterFunctionString(10000005);
     region_text.text        = ChapterTool.GetChapterFunctionString(10000537);
     set_text.text           = ChapterTool.GetChapterFunctionString(10000538);
     friend_text.text        = ChapterTool.GetChapterFunctionString(10000539);
     more_text.text          = ChapterTool.GetChapterFunctionString(10000540);
     addFriend_text.text     = ChapterTool.GetChapterFunctionString(10000536);
 }
Example #5
0
 //显示场景4的两张条漫
 void ShowFourScene()
 {
     fourCaricature.Initial(() =>
     {
         //显示下一章按钮
         nextChapterText.text = ChapterTool.GetChapterFunctionString(10000000);//下一章
         nextChapterBtn.gameObject.SetActive(true);
         ChapterModuleManager._Instance.ClickEndChapterBtn(nextChapterBtn, NextStep);
         //请求这一章读完
         ChapterModuleManager._Instance.RequestPassChapter();
     }, null);
 }
Example #6
0
    /// <summary>
    /// 创建章节标题
    /// </summary>
    /// <param name="chapterID"></param>
    /// <returns></returns>
    public static async System.Threading.Tasks.Task CreateChapterTitle(int chapterID)
    {
        var title = await UIComponent.CreateUIAsync(UIType.ChapterTitle, true);

        title.transform.SetRectTransformStretchAllWithParent(UIRoot.instance.GetUIRootCanvasTop().transform);
        ChapterTitle chapterTitle = title.GetComponent <ChapterTitle>();
        var          section      = StaticData.configExcel.GetSectionBySectionId(chapterID);
        string       titleStr     = ChapterTool.GetChapterFunctionString(section.SectionTitle[0]);
        string       titleContent = ChapterTool.GetChapterFunctionString(section.SectionTitle[1]);

        chapterTitle.Play(titleStr, titleContent);
    }
Example #7
0
    /// <summary>
    /// 展示对话
    /// </summary>
    /// <param name="data"></param>
    public async void Show(ChapterFunctionTextDefine data)
    {
        await UniTask.WaitUntil(() => !_roleSpeakAeforeAwait);

        _showText.text = ChapterTool.GetChapterFunctionString(data.ID);

        _boxBgRect.gameObject.SetActive(true);
        RefreshGroup();
        await ChapterTool.ChangeUiScale(_boxBgRect, Vector3.one, 0.1f, 10);

        _roleSpeakRearTwoAction?.Invoke(_dialogueData._FunctionData);
    }
Example #8
0
 /// <summary>
 /// 第三轮游戏
 /// </summary>
 void ThirdlyGames()
 {
     SwitchFace(nv2head_putong, nv1head_putong, nan1head_putong);//切换回普通表情
     //开启游戏按钮
     startGame.gameObject.SetActive(true);
     startGame.onClick.RemoveAllListeners();
     startGame.onClick.AddListener(() =>
     {
         startGame.enabled = false;
         startGame.gameObject.SetActive(false);
         ThirdlyStartGame();
         startGame.enabled = true;
     });
     startText.text = ChapterTool.GetChapterFunctionString(10000544); //下一轮
 }
Example #9
0
    async void ShowFour()
    {//隐藏第三场景
        await ChapterTool.FadeInFadeOut(_threeScene.GetComponent <CanvasGroup>(), 0, 1f, null);

        _fourScene.GetComponent <CanvasGroup>().blocksRaycasts = true;
        startGame.onClick.RemoveAllListeners();
        startGame.onClick.AddListener(() =>
        {//禁止连点
            startGame.enabled = false;
            startGame.gameObject.SetActive(false);
            FirstGames();
            startGame.enabled = true;
        });
        startText.text = ChapterTool.GetChapterFunctionString(10000543); //游戏开始 10000543
    }
Example #10
0
    public async void InitValue(int chapterID)
    {
        Init();
        _unlockChapterID = chapterID;//Section
        var chapterInfo = StaticData.configExcel.GetSectionBySectionId(chapterID);

        _chpaterName.text = ChapterTool.GetChapterFunctionString(chapterInfo.SectionNumber) + LocalizationDefineHelper.GetStringNameById(120127) + ChapterTool.GetChapterFunctionString(chapterInfo.SectionNameId) + LocalizationDefineHelper.GetStringNameById(120128);
        //章节icon
        if (!string.IsNullOrEmpty(chapterInfo.Icon))
        {
            _chpaterIcon.sprite = await ABManager.GetAssetAsync <Sprite>(chapterInfo.Icon);

            _chpaterIcon.SetNativeSize();
        }
    }
Example #11
0
 //显示鼓掌
 void ShowPaPaPa_Image()
 {
     ChapterHelper.SetActive(papapa_image.gameObject, true, async() =>
     {
         ChapterHelper.SetActive(platform_image.gameObject, false);
         papapa_text1.text = ChapterTool.GetChapterFunctionString(10000542);
         papapa_text2.text = ChapterTool.GetChapterFunctionString(10000542);
         papapa_text1.transform.GetComponent <CanvasGroup>().DOFade(1, 0.4f);
         papapa_text1.transform.DOLocalMove(new Vector3(-14, 1016, 0), 0.4f);
         papapa_text2.transform.GetComponent <CanvasGroup>().DOFade(1, 0.2f);
         papapa_text2.transform.DOLocalMove(new Vector3(560, -1100, 0), 0.2f);
         await UniTask.Delay(500);
         OpenClickBtn(true);
     });
 }
Example #12
0
    async void OnclickNextBtn()
    {
        nextText.text = ChapterTool.GetChapterFunctionString(10000503);//去跳舞
        await ChapterTool.FadeInFadeOut(nextBtn.GetComponent <CanvasGroup>(), 1, 0.3f, null, () =>
        {
            nextBtn.enabled = true;
        });

        nextBtn.onClick.RemoveAllListeners();
        nextBtn.onClick.AddListener(() =>
        {
            nextBtn.enabled = false;
            caricaturePlayerController.gameObject.SetActive(false);
            NextStep();
        });
    }
Example #13
0
    public override void Initial()
    {
        if (bg != null)
        {
            bg.gameObject.SetActive(true);
        }
        switch (textOrImage)
        {
        case TextOrImage.Text:
            wordText.text = ChapterTool.GetChapterFunctionString(textID);
            switch (StaticData.linguisticType)
            {
            case Company.Cfg.LinguisticType.Simplified:
                wordText.gameObject.SetActive(true);
                break;

            case Company.Cfg.LinguisticType.Complex:
                wordText.gameObject.SetActive(true);
                break;

            case Company.Cfg.LinguisticType.English:
                wordText.gameObject.SetActive(true);
                break;
            }
            break;

        case TextOrImage.Image:
            switch (StaticData.linguisticType)
            {
            case Company.Cfg.LinguisticType.Simplified:
                China_image.gameObject.SetActive(true);
                break;

            case Company.Cfg.LinguisticType.Complex:
                China_image.gameObject.SetActive(true);
                break;

            case Company.Cfg.LinguisticType.English:
                English_image.gameObject.SetActive(true);
                break;
            }
            break;
        }
        base.Initial();
    }
Example #14
0
    //显示最后一幕
    async void ShowEndScene()
    {
        //隐藏之前的所有图
        ChapterHelper.SetActive(carMoveBG.gameObject, false);
        ChapterHelper.SetActive(hugGrandpa_image.gameObject, false);
        ChapterHelper.SetActive(endScene.gameObject, true);
        var parfab = await ABManager.GetAssetAsync <GameObject>("openDoor");

        var go = GameObject.Instantiate(parfab);

        go.transform.parent = _oneScene;
        anim = go.transform.Find("Camera/kaimen").GetComponent <Animator>();

        //显示最后一幕时  请求保存

        if (isFirst)
        {//新手引导初次阅读
            ChapterModuleManager._Instance.RequestPassChapter();
            end_btn.onClick.RemoveAllListeners();
            end_btn.onClick.AddListener(() =>
            {
                end_btn.enabled = false;
                GoToManor();
            });
        }
        else
        {
            ChapterModuleManager._Instance.ClickEndChapterBtn(end_btn, null, async() =>
            {
                anim.SetBool("openDoor", true);
                await UniTask.Delay(1500);
                endScene.GetComponent <CanvasGroup>().DOFade(0, 3f);
                await UniTask.Delay(3500);
            }, 5500);
        }
        //首次通关序章
        if (isFirst)
        {
            end_btn.transform.Find("Text").GetComponent <Text>().text = StaticData.GetMultilingual(120224);//去庄园
        }
        else
        {
            end_btn.transform.Find("Text").GetComponent <Text>().text = ChapterTool.GetChapterFunctionString(10000000);//下一章
        }
    }
Example #15
0
 /// <summary>
 /// 初始化清单
 /// </summary>
 public void InitialInventory()
 {
     foreach (var item in _inventoryItemDic)
     {
         item.Value.Dispose();
     }
     _inventoryItemDic.Clear();
     for (int i = 0; i < _inventorys.Count; i++)
     {
         ShoppingItem  data    = _shoppingItemAlls[_inventorys[i]];
         string        showStr = "     " + (i + 1) + "." + ChapterTool.GetChapterFunctionString(data._CommodityName);
         InventoryItem item    = CreationInventoryItem(showStr);
         if (!_inventoryItemDic.ContainsKey(_inventorys[i]))
         {
             _inventoryItemDic.Add(_inventorys[i], item);
         }
     }
 }
Example #16
0
    /// <summary>
    /// 设置对话框类型
    /// </summary>
    /// <param name="type"></param>
    public override async void SetDialogType(ChapterDialogueTextDefine data)
    {
        base.SetDialogType(data);
        //获取对话框人物名字 设置对话框名字
        string dialogueNameData = ChapterTool.GetChapterFunctionString(data.NameID);

        if (string.IsNullOrEmpty(dialogueNameData))
        {
            _nameBoxRect.gameObject.SetActive(false);
        }
        else
        {
            _nameBoxRect.gameObject.SetActive(true);
            _nameText.text = dialogueNameData;
            LayoutRebuilder.ForceRebuildLayoutImmediate(_nameBoxRect);
        }
        //设置对话框头像
        string iconName = data.RoleIcon;

        if (string.IsNullOrEmpty(iconName))
        {
            _icon.gameObject.SetActive(false);
        }
        else
        {
            Sprite icon = null;
            try
            {
                icon = await ABManager.GetAssetAsync <Sprite>(iconName);
            }
            catch (Exception er)
            {
                Debug.Log("获取对话icon失败:" + iconName);
            }

            _icon.gameObject.SetActive(true);
            _icon.sprite = icon;
            _icon.SetNativeSize();
        }
        SetNameBoxPoint(data.BoxAdditional);
        SetShowTextSize(data.BoxAdditional);
    }
Example #17
0
 /// <summary>
 /// 初始化组件
 /// </summary>
 /// <param name="endAction"></param>
 public void Initial(Action endAction)
 {
     _merchandiseBoxTra   = transform.Find("MerchandiseBox");
     _thisCanvasGroup     = GetComponent <CanvasGroup>();
     _tagePointTra        = _merchandiseBoxTra.Find("TagePoint");
     _dialogueBox         = transform.Find("DialogueBox_Cartoon").GetComponent <DialogueBoxCartoonCpmponent>();
     _inventoryBoxRect    = transform.Find("InventoryBox").GetComponent <RectTransform>();
     _inventoryBoxBtn     = _inventoryBoxRect.Find("Mask").GetComponent <Button>();
     _inventoryRect       = transform.Find("InventoryBox/Inventory").GetComponent <RectTransform>();
     _inventoryScrollRect = _inventoryRect.Find("Scroll View").GetComponent <ScrollRect>();
     _inventoryMinBtn     = transform.Find("InventoryMinBtn").GetComponent <Button>();
     _inventoryItem       = transform.Find("InventoryItem").GetComponent <RectTransform>();
     _inventoryMinBtn.onClick.RemoveAllListeners();
     _inventoryMinBtn.onClick.AddListener(ClickInventoryMinBtn);
     _inventoryBoxBtn.onClick.RemoveAllListeners();
     _inventoryBoxBtn.onClick.AddListener(ClickInventoryBox);
     _dialogue    = transform.Find("DialogueBox_Bubble").GetComponent <DialogueBoxBubbleComponent>();
     _maskBoxRect = transform.Find("Mask").GetComponent <RectTransform>();
     _maskBtn     = _maskBoxRect.Find("MaskBtn").GetComponent <Button>();
     _maskBtnText = _maskBtn.transform.Find("Text").GetComponent <Text>();
     _maskBtn.onClick.RemoveAllListeners();
     _maskBtn.onClick.AddListener(Close);
     _maskBtnText.text = ChapterTool.GetChapterFunctionString(10000523);
     _endAction        = endAction;
     //_maskBoxRect.gameObject.SetActive(false);
     if (_initialDialogueId != 0)
     {
         _dialogue.SetStartDialogueId(_initialDialogueId);
         _dialogue.Initial(() =>
         {
             _dialogue.Close();
             OpenInventory(true);
         });
         _dialogue.Show();
         //_dialogue.gameObject.SetActive(true);
         //_dialogue.OpenClickBtn(true);
     }
     _haveItems.Clear();
     OpenInventory(false);
     InitialShoppingItemAll();
     InitialInventory();
 }
Example #18
0
    //车内回答
    async void ShowCarMoveBGAnswer()
    {//男主回答
        ChapterHelper.SetActive(nanDialogue.gameObject, true);
        //带头像男主说话
        name_nan.text = ChapterTool.GetChapterFunctionString(10000002);
        var data = ChapterTool.GetChapterData(10000029);

        dialogueText_nan.word = ChapterTool.GetDialogueString(data);
        dialogueText_nan.Play();
        dialogueText_nan.Speed6Play();

        await UniTask.Delay(2700);

        ChapterHelper.SetActive(nanDialogue.gameObject, false);

        WallLoop wallLoop = carMoveBG.transform.Find("MoveBg").GetComponent <WallLoop>();

        wallLoop.callback = () =>
        {
            ClickBtn();
        };
    }
Example #19
0
 /// <summary>
 /// 设置聊天主角
 /// </summary>
 public void SetProtagonistName()
 {
     _showNameText.text = ChapterTool.GetChapterFunctionString(_anotherId);
 }
Example #20
0
    /// <summary>
    /// 初始化组件
    /// </summary>
    public override void Initial()
    {
        _oneIamgeRect        = transform.Find("One").GetComponent <RectTransform>();
        _oneIamgeCanvasGroup = _oneIamgeRect.GetComponent <CanvasGroup>();
        _oneIamgeRect.gameObject.SetActive(true);
        _twoImageRect                    = transform.Find("Two").GetComponent <RectTransform>();
        _twoImagCanvasGroup              = _twoImageRect.GetComponent <CanvasGroup>();
        _therrBoxRect                    = transform.Find("TherBox").GetComponent <RectTransform>();
        _fourRect                        = transform.Find("Four").GetComponent <RectTransform>();
        _fourCanvasGroup                 = _fourRect.GetComponent <CanvasGroup>();
        _cupRect                         = _fourRect.Find("Cup").GetComponent <RectTransform>();
        _cupCanvasGroup                  = _cupRect.GetComponent <CanvasGroup>();
        _bgtOneCanvasGroup               = _fourRect.Find("BgOne").GetComponent <CanvasGroup>();
        _cupRectDrag                     = _cupRect.GetComponent <UIPanelDrag>();
        _cupRectDrag.m_DragPlane         = _fourRect;
        _cupRectDrag.actionOnPointerUp   = PointerUp;
        _cupRectDrag.actionOnPointerDown = PointerDown;

        _answerThePhoneRect        = transform.Find("AnswerThePhone").GetComponent <RectTransform>();
        _answerThePhoneCanvasGroup = _answerThePhoneRect.GetComponent <CanvasGroup>();

        _phoneRect        = _fourRect.Find("Phone").GetComponent <RectTransform>();
        _phoneCanvasGroup = _phoneRect.GetComponent <CanvasGroup>();
        _bgTwoRect        = _fourRect.Find("BgTwo").GetComponent <RectTransform>();
        _bgTwoCanvasGroup = _bgTwoRect.GetComponent <CanvasGroup>();
        _clickBtn         = GetComponent <Button>();
        _clickBtn.onClick.RemoveListener(ClickBtn);
        _clickBtn.onClick.AddListener(ClickBtn);

        _phoneBtn = _bgTwoRect.Find("PhoneBtn").GetComponent <Button>();
        _oneBtn   = _phoneRect.Find("BtnOne").GetComponent <Button>();
        _twoBtn   = _phoneRect.Find("BtnTwo").GetComponent <Button>();

        _fiveRect         = transform.Find("Five").GetComponent <RectTransform>();
        _fiveBtnBoxRect   = transform.Find("FiveBtnBox").GetComponent <RectTransform>();
        _fiveBtnOne       = _fiveBtnBoxRect.Find("One").GetComponent <Button>();
        _fiveBtnOneText   = _fiveBtnOne.transform.Find("Text").GetComponent <Text>();
        _fiveBtnTwo       = _fiveBtnBoxRect.Find("Two").GetComponent <Button>();
        _fiveBtnTwoText   = _fiveBtnTwo.transform.Find("Text").GetComponent <Text>();
        _fiveBtnTherr     = _fiveBtnBoxRect.Find("Therr").GetComponent <Button>();
        _fiveBtnTherrText = _fiveBtnTherr.transform.Find("Text").GetComponent <Text>();
        _oneBtn.onClick.RemoveAllListeners();
        _oneBtn.onClick.AddListener(ClickOneBtn);
        _twoBtn.onClick.RemoveAllListeners();
        _twoBtn.onClick.AddListener(ClickTwoBtn);


        _fiveBtnOneText.text   = ChapterTool.GetDialogueString(12000063);
        _fiveBtnTwoText.text   = ChapterTool.GetDialogueString(12000064);
        _fiveBtnTherrText.text = ChapterTool.GetChapterFunctionString(10000000);
        _fiveBtnOne.onClick.RemoveAllListeners();
        _fiveBtnOne.onClick.AddListener(ClickFiveBtnOne);
        _fiveBtnTwo.onClick.RemoveAllListeners();
        _fiveBtnTwo.onClick.AddListener(ClickFiveBtnTwo);
        _phoneBtn.onClick.RemoveAllListeners();
        _phoneBtn.onClick.AddListener(ClickBtn);
        ChapterModuleManager._Instance.ClickEndChapterBtn(_fiveBtnTherr, NextStep);
        //_fiveBtnTherr.onClick.RemoveAllListeners();
        //_fiveBtnTherr.onClick.AddListener(ClickFiveBtnTherr);

        _dialogueBase = transform.Find("DialogueBox_Bubble").GetComponent <DialogueBoxBubbleComponent>();
        _dialogueBoxTetragonumComponent = transform.Find("DialogueBox_Tetragonum").GetComponent <DialogueBoxTetragonumComponent>();
        _dialogueBaseTwo   = transform.Find("DialogueBox_BubbleTwo").GetComponent <DialogueBoxBubbleComponent>();
        _dialogueBaseTherr = transform.Find("DialogueBox_BubbleTherr").GetComponent <DialogueBoxBubbleComponent>();
        _dialogueBaseFour  = transform.Find("DialogueBox_BubbleFour").GetComponent <DialogueBoxBubbleComponent>();
        _dialogueBaseFive  = transform.Find("DialogueBox_BubbleFive").GetComponent <DialogueBoxBubbleComponent>();
        _chapterGuidance   = _fourRect.Find("ChapterGuidance").GetComponent <ChapterGuidance>();

        //表情
        nanface1_image = transform.Find("Two/nanface1_image").GetComponent <Image>();
        nanface2_image = transform.Find("Two/nanface2_image").GetComponent <Image>();
        nvface1_image  = transform.Find("Two/nvface1_image").GetComponent <Image>();
        nvface2_image  = transform.Find("Two/nvface2_image").GetComponent <Image>();
        nvface3_image  = transform.Find("Two/nvface3_image").GetComponent <Image>();
        nvface4_image  = transform.Find("Two/nvface4_image").GetComponent <Image>();

        //phone表情
        nv2_Rect       = _answerThePhoneRect.Find("nv2") as RectTransform;
        nv1Face1_phone = _answerThePhoneRect.Find("nv1/nv1Face1").GetComponent <Image>();
        nv1Face2_phone = _answerThePhoneRect.Find("nv1/nv1Face2").GetComponent <Image>();
        nv1Face3_phone = _answerThePhoneRect.Find("nv1/nv1Face3").GetComponent <Image>();
        nv2Face1_phone = nv2_Rect.Find("nv2Face1").GetComponent <Image>();
        nv2Face2_phone = nv2_Rect.Find("nv2Face2").GetComponent <Image>();
        nv2Face3_phone = nv2_Rect.Find("nv2Face3").GetComponent <Image>();

        //endScene表情
        nanface1_image_endScene = _fiveRect.Find("nanface1_image").GetComponent <Image>();
        nanface2_image_endScene = _fiveRect.Find("nanface2_image").GetComponent <Image>();
        nvface1_image_endScene  = _fiveRect.Find("nvface1_image").GetComponent <Image>();
        nvface2_image_endScene  = _fiveRect.Find("nvface2_image").GetComponent <Image>();

        ClickBtn();
        base.Initial();
    }
Example #21
0
    /// <summary>
    /// 杂草按钮点击
    /// </summary>
    /// <param name="tage"></param>
    public async void ClickWeedBtn(Transform tage)
    {
        Vector3 targetPos = tage.transform.localPosition;
        var     weedindex = _weedBtns.IndexOf(tage.GetComponent <Button>());

        if (weedindex == _currWeedIndex && weedCount != 0)
        {//点击当前除草区域不给予任何提示
            return;
        }
        if (isWeeding)
        {
            StaticData.CreateToastTips(ChapterTool.GetChapterFunctionString(10000541));//还没割完草
            return;
        }
        OpenAllWeedBtn(false);
        if (weedCount == 1)
        {
            createGuidance?.Invoke();
        }
        if (_roleRect.localPosition.x <= targetPos.x)
        {//向右
            if (weedindex == 1 || weedindex == 4 || weedindex == 7)
            {
                targetPos = new Vector3(targetPos.x - 65, targetPos.y, targetPos.z);//中间的草根据转向人物停止目标点修改
            }
            roleWeedingAnimatorController.SetBool("IsRight", true);
            roleWeedingAnimatorController.SetBool("IsRun", true);
        }
        else
        {//向左
            if (weedindex == 1 || weedindex == 4 || weedindex == 7)
            {
                targetPos = new Vector3(targetPos.x + 65, targetPos.y, targetPos.z);
            }
            roleWeedingAnimatorController.SetBool("IsLeft", true);
            roleWeedingAnimatorController.SetBool("IsRun", true);
        }
        _currWeedIndex = _weedBtns.IndexOf(tage.GetComponent <Button>());

        await ChapterTool.MoveUi(_roleRect, targetPos, 1, 0.5f, null, async() =>
        {
            OpenAllWeedBtn(true);
            //到达后播放待机动画
            roleWeedingAnimatorController.SetBool("IsLeft", false);
            roleWeedingAnimatorController.SetBool("IsRight", false);
            roleWeedingAnimatorController.SetBool("IsRun", false);
            //隐藏镰刀图片
            _weedBtns[weedindex].transform.Find("Image").gameObject.SetActive(false);
            //到达后自动播放锄草
            WeedingAnimaPlaying();
            //await UniTask.DelayFrame(1);
            //roleWeedingAnimatorController.SetBool("IsArrive", false);
            //除草按钮
            //if (_weedBtns[_currWeedIndex].gameObject.activeSelf)
            //{
            //    _weedingBtn.gameObject.SetActive(true);
            //}
            //else
            //{
            //    _weedingBtn.gameObject.SetActive(false);
            //}
        });
    }