예제 #1
0
    private void OpenSecondScenePanel(EnumNPCDatingSceneType t)
    {
        m_tfSecondScenePanel.SafeSetActive(true);

        var data = moduleNPCDating.GetDatingSceneData(t);

        if (data == null)
        {
            return;
        }
        m_curOpenSceneData = data;
        Util.SetText(m_textSceneName, data.nameID);
        Util.SetText(m_textSceneOpenTime, data.startTime + "-" + data.endTime);
        Util.SetText(m_textSceneDesc, data.sceneDescID);
        Util.SetText(m_textConsumePower, Util.Format(ConfigText.GetDefalutString(TextForMatType.NpcDating, 15), data.consumePower));
        UIDynamicImage.LoadImage(m_tfSceneImage, data.sceneIcon);
        UIDynamicImage.LoadImage(m_tfSceneBottomImage, data.strBottomMarkImage);
        AtlasHelper.SetNpcDateInfo(m_imgSceneTopImage, data.strTopMarkImage, null, true);

        int[] openEventNameIds = new int[] { };
        for (int i = 0; i < moduleNPCDating.openWindowData.sceneOpenEvent.Length; i++)
        {
            if (moduleNPCDating.openWindowData.sceneOpenEvent[i].datingScene == data.levelId)
            {
                openEventNameIds = moduleNPCDating.openWindowData.sceneOpenEvent[i].openEventIds;
                break;
            }
        }

        for (int i = 0; i < m_tfSceneOpenEvent.childCount; i++)
        {
            if (i <= openEventNameIds.Length - 1)
            {
                m_tfSceneOpenEvent.GetChild(i).SafeSetActive(true);
                Text eventText = m_tfSceneOpenEvent.GetChild(i).GetComponent <Text>();
                Util.SetText(eventText, openEventNameIds[i]);
            }
            else
            {
                m_tfSceneOpenEvent.GetChild(i).SafeSetActive(false);
            }
        }
    }
예제 #2
0
 public void InitData(DatingMapBuildConfig data)
 {
     m_builData        = data;
     m_eBuildSceneType = Util.ParseEnum <EnumNPCDatingSceneType>(m_builData.objectName);
     m_sceneData       = Module_NPCDating.instance.GetDatingSceneData(m_eBuildSceneType);
 }
예제 #3
0
 private void MarkRedDot(EnumNPCDatingSceneType sceneType)
 {
     m_tfRedDot?.SafeSetActive(m_eBuildSceneType == sceneType);
 }