Beispiel #1
0
    private void GetCharactorButtonClick()
    {
        TableCharactorMsg msg = new TableCharactorMsg(101, null);

        msg.msgId = (ushort)TabToyEvent.TableCharactorGet;
        SendMsg(msg);
    }
    public override void ProcessEvent(MsgBase tmpMsg)
    {
        switch (tmpMsg.msgId)
        {
        case (ushort)TabToyEvent.TableCharactorGet:
        {
            TableCharactorMsg tmp             = (TableCharactorMsg)tmpMsg;
            CharactorDefine   tmpsampleDefine = GetCharactorDefine(tmp.id);
            tmp.msgId           = (ushort)TabToyEvent.TableCharactorBack;
            tmp.charactorDefine = tmpsampleDefine;
            SendMsg(tmp);
        }
        break;

        default:
            break;
        }
    }
Beispiel #3
0
    public override void ProcessEvent(MsgBase tmpMsg)
    {
        switch (tmpMsg.msgId)
        {
        case (ushort)TabToyEvent.TableTestBackSample:
            Debug.Log("TableTestBackSample");
            TableTestMsg temp = (TableTestMsg)tmpMsg;
            Debug.Log("temp.sampleDefine.Name = " + temp.sampleDefine.Name + "temp.sampleDefine.ID =" + temp.sampleDefine.ID);
            break;

        case (ushort)TabToyEvent.TableTestBackBlongs:
            Debug.Log("TableTestBackBlongs");
            TableTestMsg temp1 = (TableTestMsg)tmpMsg;
            Debug.Log("temp.sampleDefine.Name = " + temp1.blongsDefine.NEWID + "temp.sampleDefine.ID =" + temp1.blongsDefine.NEWName);
            break;

        case (ushort)TabToyEvent.TableCharactorBack:
            Debug.Log("TableCharactorBack");
            TableCharactorMsg temp2 = (TableCharactorMsg)tmpMsg;
            Debug.Log("temp.sampleDefine.Name = " + temp2.charactorDefine.Name + "temp.sampleDefine.ID =" + temp2.charactorDefine.ID);
            break;
        }
    }