Пример #1
0
 private void OnClose(object sender, CloseEventArgs e)
 {
     if (this._callback == null)
     {
         return;
     }
     BoyApp.PushEvent(delegate() {
         this._callback(false);
     });
 }
        static int _m_PushEvent_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    System.Action action = translator.GetDelegate <System.Action>(L, 1);

                    BoyApp.PushEvent(action);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Пример #3
0
    private void OnMessage(object sender, MessageEventArgs e)
    {
        try
        {
            MsgPack packer = new MsgPack(e.RawData);
            int     proto  = packer.UnPackProtoID();
            if (proto != (int)COM_GAME_FRAMEWORK.eS2C_Json)
            {
                Debug.Log(proto + " id not support");
                return;
            }
            S2C_Json msg = new S2C_Json();
            msg.Unpack(packer);

            BoyApp.PushEvent(delegate(){
                this._msgCallback(msg.json);
            });
        }
        catch (Exception ee) {
            Debug.LogError(ee.Message);
        }
    }
Пример #4
0
 private void OnOpen(object sender, EventArgs e)
 {
     BoyApp.PushEvent(delegate(){
         this._callback(true);
     });
 }