Esempio n. 1
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static FuncApplyMatchRequest create(int funcID)
    {
        FuncApplyMatchRequest re = (FuncApplyMatchRequest)BytesControl.createRequest(dataID);

        re.funcID = funcID;
        return(re);
    }
Esempio n. 2
0
    protected override void init()
    {
        base.init();

        _model.Button_start.click = () =>
        {
            if (me.scene.isMatching())
            {
                FuncApplyCancelMatchRequest.create(GFunctionType.Melee).send();
            }
            else
            {
                FuncApplyMatchRequest.create(GFunctionType.Melee).send();
            }
        };

        registPlayerEventListener(GameEventType.StartMatch, onMatchChange);
        registPlayerEventListener(GameEventType.CancelMatch, onMatchChange);
    }