Exemplo n.º 1
0
    public void SendMsg(object bp)
    {
        JsonUtility.ToJson(bp);
        string bpOut = JsonUtility.ToJson(bp);

        if (NetWorkConst.IsOpenNetWork)
        {
            /*
             * gprotocol.role_bc_info_c2s vo = new gprotocol.role_bc_info_c2s()
             * {
             * data = bpOut,
             * };*/
            //NetWorkManager.Instace.SendNetMsg(Module.role, Command.role_bc_info, vo);
        }
        else
        {
            BPBattleEvent.GetInstance().dispatchEvent(BP_BATTLE_EVENT.COMMAND, new Notification(bpOut));
        }
    }
Exemplo n.º 2
0
 public void RemoveEvent()
 {
     BPBattleEvent.GetInstance().removeEventListener(BP_BATTLE_EVENT.COMMAND, OnBPBattleEvent);
 }
Exemplo n.º 3
0
 public void InitEvent()
 {
     BPBattleEvent.GetInstance().addEventListener(BP_BATTLE_EVENT.COMMAND, OnBPBattleEvent);
 }