Beispiel #1
0
    void OnS2C_InitChar(BaseEvent evt)
    {
        clientmsg.s2c_initchar initchar = (clientmsg.s2c_initchar)evt.Params["protomsg"];
        LoginPanel.isCreateChararcter = initchar.newchar;

        int count = initchar.heros.Count;

        for (int i = 0; i < count; i++)
        {
            ArrangementPanel.spritename.Add(int.Parse(initchar.heros[i].id.ToString()), initchar.heros[i].icon);
        }
    }
        private void OnS2C_ResponseInitChar(ProtoBuf.IExtensible msg)
        {
            UnityEngine.Debug.Log("SystemProtoBufController------>OnS2C_ResponseInitChar");
            clientmsg.s2c_initchar clientinit = msg as clientmsg.s2c_initchar;
            Hashtable hashtable = new Hashtable();

            //if (clientinit.result == common.enumGetCharResult.Response_Success)
            {
                hashtable["protomsg"] = clientinit;
                AWEvent evt = new AWEvent(AWEvent.S2C_INITCHAR, hashtable);
                this.sfs.DispatchEvent(evt);
            }
        }