示例#1
0
 public void Match(Action <bool> callback)
 {
     matchCallback += callback;
     if (matchState == processType.None)
     {
         matchState = processType.Processing;
         if (initState == processType.Complete)
         {
             MatchVSResponseInner.Inst.Match(Config.MaxPlayer);
         }
         else
         {
             Initialize();
         }
     }
 }
示例#2
0
    public void OnInitRes(bool suc)
    {
        if (suc)
        {
            initState = processType.Complete;
        }
        else
        {
            initState = processType.None;
        }

        if (matchState == processType.Processing)
        {
            if (suc)
            {
                MatchVSResponseInner.Inst.Match(Config.MaxPlayer);
            }
            else
            {
                OnMatchRres(false);
            }
        }
    }