Exemplo n.º 1
0
 private void TryUpdateValue(StoryInstance instance)
 {
     if (m_CampId.HaveValue && m_Index.HaveValue)
     {
         m_HaveValue = true;
         int sceneId    = PluginFramework.Instance.SceneId;
         int campId     = m_CampId.Value;
         int index      = m_Index.Value;
         int monstersId = TableConfigUtility.GenLevelMonstersId(sceneId, campId);
         List <TableConfig.LevelMonster> monsterList;
         if (TableConfig.LevelMonsterProvider.Instance.TryGetValue(monstersId, out monsterList))
         {
             if (index >= 0 && index < monsterList.Count)
             {
                 m_Value = monsterList[index];
             }
             else
             {
                 m_Value = null;
             }
         }
         else
         {
             m_Value = null;
         }
     }
 }
Exemplo n.º 2
0
        private void TryUpdateValue(StoryInstance instance)
        {
            Scene scene = instance.Context as Scene;

            if (null != scene)
            {
                if (m_CampId.HaveValue && m_Index.HaveValue)
                {
                    m_HaveValue = true;
                    int sceneId    = scene.SceneResId;
                    int campId     = m_CampId.Value;
                    int index      = m_Index.Value;
                    int monstersId = TableConfigUtility.GenLevelMonstersId(sceneId, campId);
                    List <TableConfig.LevelMonster> monsterList;
                    if (TableConfig.LevelMonsterProvider.Instance.TryGetValue(monstersId, out monsterList))
                    {
                        if (index >= 0 && index < monsterList.Count)
                        {
                            m_Value = BoxedValue.From(monsterList[index]);
                        }
                        else
                        {
                            m_Value = BoxedValue.NullObject;
                        }
                    }
                    else
                    {
                        m_Value = BoxedValue.NullObject;
                    }
                }
            }
        }
Exemplo n.º 3
0
 private void TryUpdateValue(StoryInstance instance)
 {
     if (m_DlgId.HaveValue && m_Index.HaveValue)
     {
         m_HaveValue = true;
         int dlgId                = m_DlgId.Value;
         int index                = m_Index.Value;
         int dlgItemId            = TableConfigUtility.GenStoryDlgItemId(dlgId, index);
         TableConfig.StoryDlg cfg = TableConfig.StoryDlgProvider.Instance.GetStoryDlg(dlgItemId);
         if (null != cfg)
         {
             m_Value = cfg;
         }
         else
         {
             m_Value = null;
         }
     }
 }
Exemplo n.º 4
0
        private void TryUpdateValue(StoryInstance instance)
        {
            Scene scene = instance.Context as Scene;

            if (null != scene)
            {
                if (m_DlgId.HaveValue && m_Index.HaveValue)
                {
                    m_HaveValue = true;
                    int dlgId                = m_DlgId.Value;
                    int index                = m_Index.Value;
                    int dlgItemId            = TableConfigUtility.GenStoryDlgItemId(dlgId, index);
                    TableConfig.StoryDlg cfg = TableConfig.StoryDlgProvider.Instance.GetStoryDlg(dlgItemId);
                    if (null != cfg)
                    {
                        m_Value = BoxedValue.From(cfg);
                    }
                    else
                    {
                        m_Value = BoxedValue.NullObject;
                    }
                }
            }
        }