示例#1
0
    private void OpenMessage(Animator animator)
    {
        //IL_0032: Unknown result type (might be due to invalid IL or missing references)
        //IL_0048: Unknown result type (might be due to invalid IL or missing references)
        //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
        //IL_00bc: Unknown result type (might be due to invalid IL or missing references)
        isLoading = false;
        Open(UITransition.TYPE.OPEN);
        if (needUpdateAnchors)
        {
            needUpdateAnchors = false;
            UpdateAnchors();
        }
        model.set_localPosition(message.pos);
        model.set_localEulerAngles(message.rot);
        if (animator != null)
        {
            PlayerAnimCtrl.Get(animator, PlayerAnimCtrl.StringToEnum(npcData.anim), null, null, null);
        }
        EnableRenderTexture(targetTex);
        string replaceText = message.GetReplaceText();

        SetColor((Enum)UI.SPR_MESSAGE, (!isShowMessage || string.IsNullOrEmpty(replaceText)) ? Color.get_clear() : Color.get_white());
        isShowMessage = true;
        SetLabelText((Enum)UI.LBL_MESSAGE, replaceText);
        string displayName = npcData.displayName;

        SetLabelText((Enum)UI.LBL_NAME, displayName);
        if (message.has_voice)
        {
            SoundManager.PlayVoice(message.voice_id, 1f, 0u, null, null);
        }
        if (targetTex == UI.TEX_QUEST_NPC)
        {
            InitUITweener <TweenColor>((Enum)UI.TEX_QUEST_NPC, true, (EventDelegate.Callback)DeleteModel);
            InitUITweener <TweenColor>((Enum)UI.SPR_MESSAGE, true, (EventDelegate.Callback)null);
        }
    }
    private void SetNPCMessage(UI tab)
    {
        if (!isInGameScene)
        {
            string str = string.Empty;
            switch (tab)
            {
            case UI.BTN_TAB_NORMAL:
                str = ((!MonoBehaviourSingleton <DeliveryManager> .I.IsExistDelivery(TAB_TYPES[0])) ? "_COMPLETE" : string.Empty);
                break;

            case UI.BTN_TAB_DAILY:
                str = ((!MonoBehaviourSingleton <DeliveryManager> .I.IsExistDelivery(TAB_TYPES[1])) ? "_COMPLETE" : "_DAILY");
                break;

            case UI.BTN_TAB_WEEKLY:
                str = ((!MonoBehaviourSingleton <DeliveryManager> .I.IsExistDelivery(TAB_TYPES[2])) ? "_COMPLETE" : "_WEEKLY");
                break;
            }
            NPCMessageTable.Section section = Singleton <NPCMessageTable> .I.GetSection(base.sectionData.sectionName + str + "_TEXT");

            if (section != null)
            {
                NPCMessageTable.Message nPCMessage = section.GetNPCMessage();
                if (nPCMessage != null)
                {
                    npcText = nPCMessage.GetReplaceText();
                }
            }
            else
            {
                npcText = base.sectionData.GetText("NPC_MESSAGE_" + Random.Range(0, 3));
            }
            SetLabelText((Enum)UI.LBL_NPC_MESSAGE, npcText);
        }
    }