Example #1
0
 public void OpenRuleView(int gameId)
 {
     UIViewUtil.Instance.LoadWindowAsync(UIWindowType.Rule, (GameObject go) =>
     {
         if (m_UIRuleView == null)
         {
             UIRuleView view2 = go.GetComponent <UIRuleView>();
             if (gameId == 0)
             {
                 view2.SetGame(string.Empty);
             }
             else
             {
                 view2.SetGame(cfg_gameDBModel.Instance.Get(gameId).GameType);
             }
             return;
         }
     });
 }
Example #2
0
 private void OpenRuleView()
 {
     UIViewUtil.Instance.LoadWindowAsync(UIWindowType.Rule, (GameObject go) =>
     {
         if (m_UIRuleView == null)
         {
             List <cfg_gameEntity> lst = cfg_gameDBModel.Instance.GetList();
             string gameType           = lst.Count > 0 ? lst[0].GameType : string.Empty;
             UIRuleView view2          = go.GetComponent <UIRuleView>();
             view2.SetGame(gameType);
             return;
         }
         List <cfg_gameEntity> lstGame = cfg_gameDBModel.Instance.GetList();
     });
 }