| | |
| | |
|
| | | //新功能开放
|
| | | [SerializeField] Transform m_NewFunction;
|
| | | [SerializeField] Transform m_ContainerFunctionBg; //附加说明特效为显示时播放 不需要代码控制
|
| | | [SerializeField] Transform m_ContainerFunctionBg; |
| | | [SerializeField] Text m_FunctionName;
|
| | | [SerializeField] Image m_FuncIcon; //功能图片飞入对应位置
|
| | | [SerializeField] UIEffectPlayer unlockEffect; //飞到对应功能后爆开特效
|
| | | [SerializeField] UIEffectPlayer funcEffect; //功能解锁特效
|
| | |
|
| | | //引导npc对话
|
| | | [SerializeField] Transform m_GuideTalkRect;
|
| | |
| | | m_NewFunction.SetActive(true);
|
| | | m_NewBieGuide.SetActive(false);
|
| | | m_GuideTalkRect.SetActive(false);
|
| | | funcEffect.PlayByArrIndex(0);
|
| | | DisplayFunctionUnLock(config.Condition);
|
| | | }
|
| | | else if (type == GuideType.NpcTalk)
|
| | |
| | | var config = FuncOpenLVConfig.Get(_functionId);
|
| | | m_FunctionName.text = config.Name;
|
| | | m_FuncIcon.SetSprite(config.Icon);
|
| | | m_FuncIcon.SetNativeSize();
|
| | | m_ContainerFunctionBg.SetActive(true);
|
| | | m_FunctionName.SetActive(true);
|
| | | m_FuncIcon.SetActive(true);
|
| | | m_FuncIcon.transform.localPosition = Vector3.zero;
|
| | | unlockEffect.Stop();
|
| | |
| | |
|
| | |
|
| | | void DisplayNPCTalk()
|
| | | { |
| | | m_newBieGuideNPC.effectId = stepConfig.effect;
|
| | | m_newBieGuideNPC.PlayByArrIndex(stepConfig.usherAction);
|
| | | m_newBieGuideNPC.transform.localPosition = stepConfig.usherPosition;
|
| | | m_newBieGuideNPC.transform.localScale = new Vector3(stepConfig.usherOrientation == NewBieGuideScriptableObject.UsherOrientation.Normal ? 1 : -1, 1, 1);
|
| | | {
|
| | | if (stepConfig.effect == 0)
|
| | | {
|
| | | m_newBieGuideNPC.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_newBieGuideNPC.SetActive(true);
|
| | | m_newBieGuideNPC.effectId = stepConfig.effect;
|
| | | m_newBieGuideNPC.PlayByArrIndex(stepConfig.usherAction);
|
| | | m_newBieGuideNPC.transform.localPosition = stepConfig.usherPosition;
|
| | | m_newBieGuideNPC.transform.localScale = new Vector3(stepConfig.usherOrientation == NewBieGuideScriptableObject.UsherOrientation.Normal ? 1 : -1, 1, 1);
|
| | | } |
| | | m_TalkText.text = stepConfig.GetTipContent();
|
| | | }
|
| | |
|
| | |
| | |
|
| | | async UniTask Co_FunctionUnLockDelay()
|
| | | {
|
| | | await UniTask.Delay(2000);
|
| | | await UniTask.Delay(1300);
|
| | |
|
| | | m_ContainerFunctionBg.SetActive(false);
|
| | | m_FunctionName.SetActive(false);
|
| | | unlockEffect.transform.position = m_ClickTarget.position;
|
| | | m_FuncIcon.transform.DOMove(m_ClickTarget.position, 0.5f).SetEase(Ease.OutQuad).OnComplete(() =>
|
| | | {
|