Esempio n. 1
0
        override public void setIdAndPnt(uint objId, GameObject pntGo_)
        {
            base.setIdAndPnt(objId, pntGo_);
            TableCardItemBody tableBody = Ctx.m_instance.m_tableSys.getItem(TableID.TABLE_CARD, objId).m_itemBody as TableCardItemBody;
            updateLeftAttr(tableBody);
            UtilApi.setLayer(m_model.selfGo, Config.UIModelLayer);

            m_guangyunImg = UtilApi.TransFindChildByPObjAndPath(m_model.selfGo, "UIRoot/guangyunImg");
            m_spriteAni = Ctx.m_instance.m_spriteAniMgr.createAndAdd();
            m_spriteAni.selfGo = m_guangyunImg;
            if (0 == tableBody.m_quality)
                m_spriteAni.tableID = 18;
            else if (1 == tableBody.m_quality)
                m_spriteAni.tableID = 19;
            else if (2 == tableBody.m_quality)
                m_spriteAni.tableID = 20;
            else if (3 == tableBody.m_quality)
                m_spriteAni.tableID = 21;
            else
                m_spriteAni.tableID = 22;
            m_spriteAni.bLoop = true;
            m_spriteAni.playEndEventDispatch.addEventHandle(guangYunPlayEnd);
            m_spriteAni.syncUpdateCom();
            m_spriteAni.updateImage();
        }
Esempio n. 2
0
 override public void onExit()
 {
     base.onExit();
     if (m_spriteAni != null)
     {
         m_spriteAni.dispose();
         m_spriteAni = null;
     }
 }
Esempio n. 3
0
        public override void dispose()
        {
            base.dispose();

            if(m_fanKaAni != null)
            {
                m_fanKaAni.dispose();
                m_fanKaAni = null;
            }

            if (m_spriteAni != null)
            {
                m_spriteAni.dispose();
                m_spriteAni = null;
            }
        }
Esempio n. 4
0
        public void startmatch()
        {
            //m_dzStartDescText.text = "开始匹配中";
            //m_dzStartDescText.show();     // 默认隐藏
            m_bgPanel = UtilApi.TransFindChildByPObjAndPath(m_jobSelectData.m_form.m_GUIWin.m_uiRoot, JobSelectPath.bgPanel);
            UtilApi.SetActive(m_bgPanel, true);
            m_imageMatchBg = UtilApi.TransFindChildByPObjAndPath(m_jobSelectData.m_form.m_GUIWin.m_uiRoot, JobSelectPath.DzStartMatchBg);
            UtilApi.SetActive(m_imageMatchBg, true);

            UtilApi.SetActive(m_imageGo, true);
            m_spriteAni = Ctx.m_instance.m_spriteAniMgr.createAndAdd();
            m_spriteAni.selfGo = m_imageGo;
            m_spriteAni.tableID = 8;
            m_spriteAni.bLoop = true;
            m_spriteAni.play();

            UtilApi.SetActive(m_imageGo2, true);
            m_spriteAni2 = Ctx.m_instance.m_spriteAniMgr.createAndAdd();
            m_spriteAni2.selfGo = m_imageGo2;
            m_spriteAni2.tableID = 9;
            m_spriteAni2.bLoop = true;
            m_spriteAni2.play();
            // test 进入战场
#if DEBUG_NOTNET
            Ctx.m_instance.m_gameSys.loadDZScene(1);
#endif
        }
Esempio n. 5
0
        override public void dispose()
        {
            base.dispose();

            if (m_jobNameImage != null)
            {
                m_jobNameImage.dispose();
            }

            if(m_spriteAni != null)
            {
                m_spriteAni.dispose();
                m_spriteAni = null;
            }

            if (m_spriteAni2 != null)
            {
                m_spriteAni2.dispose();
                m_spriteAni2 = null;
            }

            foreach(var ele in m_jobCardList)
            {
                ele.dispose();
            }
        }
Esempio n. 6
0
 protected void showOpenEff()
 {
     m_spriteAni = Ctx.m_instance.m_spriteAniMgr.createAndAdd();
     m_spriteAni.selfGo = m_openEffImg;
     m_spriteAni.tableID = 6;
     m_spriteAni.bLoop = false;
     m_spriteAni.playEndEventDispatch.addEventHandle(effcPlayEnd);
     m_spriteAni.play();
 }
Esempio n. 7
0
 protected void onBtnClkBack(IDispatchObject dispObj)
 {
     if (m_spriteAni != null)
     {
         m_spriteAni.dispose();
         m_spriteAni = null;
     }
     exit();
 }
Esempio n. 8
0
        public void onJobSelBtnClk()
        {
            if (m_jobSelectData.m_midPnl.curSelJobCard == null || !m_jobSelectData.m_midPnl.curSelJobCard.Equals(this))
            {
                if (m_jobSelectData.m_midPnl.curSelJobCard != null && m_jobSelectData.m_midPnl.curSelJobCard.m_spriteAni != null)
                {
                    m_jobSelectData.m_midPnl.curSelJobCard.m_spriteAni.stop();
                }

                m_jobSelectData.m_midPnl.curSelJobCard = this;
                m_jobSelectData.m_midPnl.toggleJob(m_tag);

                m_jobSelectData.m_rightPnl.m_jobSelProg.update();

                UtilApi.SetActive(m_imageGo, true);
                if (m_spriteAni == null)
                {
                    m_spriteAni = Ctx.m_instance.m_spriteAniMgr.createAndAdd();
                    m_spriteAni.selfGo = m_imageGo;
                    m_spriteAni.tableID = 11;
                    m_spriteAni.bLoop = true;
                }
                m_spriteAni.play();
            }
        }
Esempio n. 9
0
        // 点击登陆处理
        protected void onBtnClkLogin()
        {
            if (Ctx.m_instance.m_loginSys.get_LoginState() != LoginState.eLoginingLoginServer && Ctx.m_instance.m_loginSys.get_LoginState() != LoginState.eLoginingGateServer)    // 如果没有正在登陆登陆服务器和网关服务器
            {
                AuxInputField lblName = new AuxInputField(m_GUIWin.m_uiRoot, LoginComPath.PathLblName);
                AuxInputField lblPassWord = new AuxInputField(m_GUIWin.m_uiRoot, LoginComPath.PathLblPassWord);

                if (validStr(lblName.text, lblPassWord.text))
                {
                    Ctx.m_instance.m_systemSetting.setString(SystemSetting.USERNAME, lblName.text);
                    Ctx.m_instance.m_systemSetting.setString(SystemSetting.PASSWORD, lblPassWord.text);

#if !DEBUG_NOTNET
                    if (Ctx.m_instance.m_loginSys.get_LoginState() != LoginState.eLoginNone)        // 先关闭之前的 socket
                    {
                        Ctx.m_instance.m_netMgr.closeSocket(Ctx.m_instance.m_cfg.m_ip, Ctx.m_instance.m_cfg.m_port);
                    }
                    Ctx.m_instance.m_loginSys.connectLoginServer(lblName.text, lblPassWord.text);
#else
                    Ctx.m_instance.m_moduleSys.loadModule(ModuleID.GAMEMN);
#endif

                    UtilApi.SetActive(m_imageEffect, true);
                    m_spriteAni = Ctx.m_instance.m_spriteAniMgr.createAndAdd();
                    if (m_spriteAni != null)
                    {
                        m_spriteAni.selfGo = m_imageEffect;
                        m_spriteAni.tableID = 12;
                        m_spriteAni.bLoop = true;
                        m_spriteAni.play();
                    }
                }
            }
        }
Esempio n. 10
0
 protected void testImageEffect()
 {
     m_spriteAni = Ctx.m_instance.m_spriteAniMgr.createAndAdd();
     m_spriteAni.selfGo = m_imageGo;
     m_spriteAni.tableID = 1;
     m_spriteAni.bLoop = true;
     m_spriteAni.play();
 }