コード例 #1
0
ファイル: OpenCardItem.cs プロジェクト: zhutaorun/unitygame
        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();
        }
コード例 #2
0
ファイル: UILogin.cs プロジェクト: zhutaorun/unitygame
 override public void onExit()
 {
     base.onExit();
     if (m_spriteAni != null)
     {
         m_spriteAni.dispose();
         m_spriteAni = null;
     }
 }
コード例 #3
0
ファイル: OpenCardItem.cs プロジェクト: zhutaorun/unitygame
        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;
            }
        }
コード例 #4
0
ファイル: JobSelMidPnl.cs プロジェクト: zhutaorun/unitygame
        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
        }
コード例 #5
0
ファイル: JobSelMidPnl.cs プロジェクト: zhutaorun/unitygame
        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();
            }
        }
コード例 #6
0
ファイル: UIOpenPack.cs プロジェクト: zhutaorun/unitygame
 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();
 }
コード例 #7
0
ファイル: UIOpenPack.cs プロジェクト: zhutaorun/unitygame
 protected void onBtnClkBack(IDispatchObject dispObj)
 {
     if (m_spriteAni != null)
     {
         m_spriteAni.dispose();
         m_spriteAni = null;
     }
     exit();
 }
コード例 #8
0
ファイル: JobCard.cs プロジェクト: zhutaorun/unitygame
        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();
            }
        }
コード例 #9
0
ファイル: UILogin.cs プロジェクト: zhutaorun/unitygame
        // 点击登陆处理
        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();
                    }
                }
            }
        }
コード例 #10
0
ファイル: UILogicTest.cs プロジェクト: zhutaorun/unitygame
 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();
 }