public void button_press(int tag) { CGameScene pGameScene = (CGameScene)parent(); if (tag == 10400) { Show(false); if (pGameScene.m_dwRoomType == 3) { CMD_C_Gate_Ctrl_Send GateCtrlSend = new CMD_C_Gate_Ctrl_Send(); GateCtrlSend.wChair = pGameScene.GetMeChairID(); GateCtrlSend.cbFirst = 7; GateCtrlSend.nGateCount = pGameScene.m_nCurGateCount; pGameScene.m_layRoles[pGameScene.GetMeChairID()].SetFishGold(pGameScene.m_nFishScoreBase); pGameScene.GetClientKernel().SendSocketData(FishDefine.SUB_C_GATE_CTRL_SEND, GateCtrlSend); int nRand = 1 + random_.Next() % 4; //pakcj Sleep(nRand * 1000); ((CGameScene)parent()).window_closed(null); Root.instance().queue_end_rendering(); } } }
public void button_press(int tag) { if (tag == 10300) { //CGameScene *pGameScene = (CGameScene *)parent(); //CMD_GF_WriteMatchScore pWriteMatchScore; //ZeroMemory(&pWriteMatchScore,sizeof(pWriteMatchScore)); //pWriteMatchScore.lMatchScore=2000; //pGameScene->GetClientKernel()->SendWriteMatchScore(&pWriteMatchScore,sizeof(pWriteMatchScore)); //Show(false); CGameScene pGameScene = (CGameScene)parent(); if ((pGameScene.m_dwRoomType == 1) || (pGameScene.m_dwRoomType == 2)) { CMD_C_Match_Start MatchStar = new CMD_C_Match_Start(); MatchStar.wChair = pGameScene.GetMeChairID(); MatchStar.dwScore = 0; MatchStar.dwMatchScore = 0; pGameScene.GetClientKernel().SendSocketData(FishDefine.SUB_C_MATCH_START, MatchStar); } else if (pGameScene.m_dwRoomType == 3) { CMD_C_Gate_Ctrl_Send GateCtrlSend = new CMD_C_Gate_Ctrl_Send(); GateCtrlSend.wChair = pGameScene.GetMeChairID(); GateCtrlSend.cbFirst = 0; GateCtrlSend.nGateCount = 0; pGameScene.GetClientKernel().SendSocketData(FishDefine.SUB_C_GATE_CTRL_SEND, GateCtrlSend); Show(false); } } else if (tag == 10302) { CGameScene pGameScene = (CGameScene)parent(); if (pGameScene.m_dwRoomType == 2) { m_sprBackground.set_display_image(Root.instance().imageset_manager().imageset("ui_load").image("match_start0_image")); } else if (pGameScene.m_dwRoomType == 1) { m_sprBackground.set_display_image(Root.instance().imageset_manager().imageset("ui_load").image("match_start1_image")); } else if (pGameScene.m_dwRoomType == 3) { m_sprBackground.set_display_image(Root.instance().imageset_manager().imageset("ui_load").image("match_start2_image")); } } }