Esempio n. 1
0
 public void psstRetBattleHistoryInfoUserCmd(stRetBattleHistoryInfoUserCmd cmd)
 {
     SlideListItem item = new SlideListItem();
     item.data = cmd;
     item.path = string.Format("{0}{1}", Ctx.m_instance.m_cfg.m_pathLst[(int)ResPathType.ePathModel], "log.prefab");
     item.texPath = string.Format("{0}{1}", Ctx.m_instance.m_cfg.m_pathLst[(int)ResPathType.ePathBuildImage], "pig.png");
     m_historyList.addItem(item);
 }
Esempio n. 2
0
 public void showTips(Vector3 pos, stRetBattleHistoryInfoUserCmd data)
 {
     if (m_historyTips == null)
     {
         m_historyTips = new HistoryTips(m_sceneTipsData);
         m_historyTips.initWidget();
     }
     m_curTips = m_historyTips;
     m_historyTips.showTips(pos, data);
 }
Esempio n. 3
0
        public void showTips(Vector3 pos, stRetBattleHistoryInfoUserCmd data)
        {
            show();

            // 显示卡牌历史提示
            TableCardItemBody cardTableItem = Ctx.m_instance.m_tableSys.getItem(TableID.TABLE_CARD, data.maincard.dwObjectID).m_itemBody as TableCardItemBody;

            GameObject tmpGO = null;
            //tmpGO = Ctx.m_instance.m_modelMgr.getSceneCardModel((CardType)cardTableItem.m_type).getObject();
            if (tmpGO != null)
            {
                m_cardItem.setGameObject(UtilApi.Instantiate(tmpGO) as GameObject);
                m_cardItem.transform.SetParent(m_tipsItemRoot.transform, false);
                UtilApi.setPos(m_cardItem.transform, new Vector3(-2.12f, 0, 0));
#if UNITY_5
                UtilApi.setRot(m_cardItem.transform, Quaternion.Euler(270, 0, 0));
#elif UNITY_4_6 || UNITY_4_5
                UtilApi.setRot(m_cardItem.transform, Quaternion.EulerRotation(270, 0, 0));
#endif
            }

            int idx = 0;
            for (idx = 0; idx < data.othercard.Length; ++idx)
            {
                cardTableItem = Ctx.m_instance.m_tableSys.getItem(TableID.TABLE_CARD, data.othercard[idx].dwObjectID).m_itemBody as TableCardItemBody;

                //tmpGO = Ctx.m_instance.m_modelMgr.getSceneCardModel((CardType)cardTableItem.m_type).getObject();
                if (tmpGO != null)
                {
                    if (idx >= m_list.Count)
                    {
                        m_list.Add(new HistoryTipsCard());
                    }

                    m_list[idx].setGameObject(UtilApi.Instantiate(tmpGO) as GameObject);
                    m_list[idx].transform.SetParent(m_tipsItemRoot.transform, false);
                    UtilApi.setPos(m_cardItem.transform, new Vector3(-2.12f + 1.5f * (1 + idx), 0, 0));
#if UNITY_5
                    UtilApi.setRot(m_list[idx].transform, Quaternion.Euler(270, 0, 0));
#elif UNITY_4_6 || UNITY_4_5
                    UtilApi.setRot(m_list[idx].transform, Quaternion.EulerRotation(270, 0, 0));
#endif
                }
            }
        }
Esempio n. 4
0
 protected void addHistoryItem()
 {
     UISceneDZ uiDZ = Ctx.m_instance.m_uiSceneMgr.getSceneUI<UISceneDZ>(UISceneFormID.eUISceneDZ);
     stRetBattleHistoryInfoUserCmd cmd = new stRetBattleHistoryInfoUserCmd();
     cmd.maincard = new t_Card();
     cmd.maincard.dwObjectID = 10001;
     uiDZ.m_sceneDZData.m_historyArea.psstRetBattleHistoryInfoUserCmd(cmd);
 }
Esempio n. 5
0
 public void psstRetBattleHistoryInfoUserCmd(stRetBattleHistoryInfoUserCmd cmd)
 {
     m_sceneDZData.m_historyArea.psstRetBattleHistoryInfoUserCmd(cmd);
 }
        protected void psstRetBattleHistoryInfoUserCmd(ByteBuffer bu)
        {
            stRetBattleHistoryInfoUserCmd cmd = new stRetBattleHistoryInfoUserCmd();
            cmd.derialize(bu);

            UISceneDZ uiSceneDZ = Ctx.m_instance.m_uiSceneMgr.getSceneUI<UISceneDZ>(UISceneFormID.eUISceneDZ);
            if (uiSceneDZ != null && uiSceneDZ.isVisible())
            {
                uiSceneDZ.psstRetBattleHistoryInfoUserCmd(cmd);
            }
        }