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 }
private void OnEnable() { if (null == ani) { ani = new SpriteAni(); } }
// 点击登陆处理 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(); } } } }
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(); } }
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(); } }
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(); }
override public void onExit() { base.onExit(); if (m_spriteAni != null) { m_spriteAni.dispose(); m_spriteAni = null; } }
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(); }
protected void onBtnClkBack(IDispatchObject dispObj) { if (m_spriteAni != null) { m_spriteAni.dispose(); m_spriteAni = null; } exit(); }
public void DrawSprite(SpriteAni ani, Vector2 pos) { SpriteAniController con = new SpriteAniController(ani.GetElement(null)); con.bplay = true; anis.Add(pos, con); //anis.Add(ani); }
void UpdateAnim(IEnumerable <Anim> anim) { game.ClearSprite(); float x = 50; tags.Clear(); foreach (var ani in anim) { var drawani = SpriteAni.CreateAni(ani, game.tmgr, "tmpcharbitmap"); lastani = drawani; for (int i = 0; i < ani.frames.Count; i++) { foreach (var tag in drawani.GetFrameByID(i).bounds.Keys) { if (tags.Contains(tag) == false) { tags.Add(tag); } } } game.DrawSprite(drawani, new Vector2(x + ani.size.X / 2, 300)); x += ani.size.X * 1.5f; } if (tags.Contains("") == false) { tags.Add(""); } this.checkedListBox1.Items.Clear(); this.listBox2.Items.Clear(); foreach (var l in tags) { this.checkedListBox1.Items.Add(new TagInfo(l)); this.listBox2.Items.Add(new TagInfo(l)); } //this.checkedListBox1.SelectedItems.Clear(); for (int i = 0; i < this.checkedListBox1.Items.Count; i++) { checkedListBox1.SetItemChecked(i, true); } checkedListBox2.Items.Clear(); foreach (var i in game.dummyshow) { checkedListBox2.Items.Add(i.Key); checkedListBox2.SetItemChecked(checkedListBox2.Items.Count - 1, i.Value); } }
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; } }
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(); }
private void OnDestroy() { ani = null; }
public void DrawSprite(SpriteAni ani,Vector2 pos) { SpriteAniController con = new SpriteAniController(ani.GetElement(null)); con.bplay = true; anis.Add(pos, con); //anis.Add(ani); }