Exemple #1
0
 private void EnterRoom(Payloader <SC_EnterRoom> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
     });
 }
Exemple #2
0
 protected void CompleteLoading(Payloader <SC_CompleteLoading> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
     });
 }
Exemple #3
0
 protected void Play(Payloader <SC_Play> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
     });
 }
Exemple #4
0
 protected void CombineCube(Payloader <SC_CombineCube> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
         GetTeam(data.Id)?.CombineCube(data.OwnerSeq, data.TargetSeq);
     });
 }
Exemple #5
0
 private void ExitMatch(Payloader <SC_ExitMatch> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
         Router.Close("MatchView");
     });
 }
Exemple #6
0
 private void EnterMatch(Payloader <SC_EnterMatch> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
         Router.Open("MatchView");
     });
 }
Exemple #7
0
 private void ExitRoom(Payloader <SC_ExitRoom> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
         Router.CloseAndOpen("LobbyView/PlayView");
     });
 }
Exemple #8
0
 protected void DeleteCube(Payloader <SC_DeleteCube> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
         GetTeam(data.Id)?.DeleteCube(data.DeleteCubes);
     });
 }
Exemple #9
0
 protected void ShotMissile(Payloader <SC_ShotMissile> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
         GetTeam(data.Id)?.ShotMissile(data.CubeSeq, data.MonsterSeq);
     });
 }
Exemple #10
0
 protected void MoveCube(Payloader <SC_MoveCube> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
         GetTeam(data.Id)?.MoveCube(data.CubeSeq, data.PositionX, data.PositionY);
     });
 }
Exemple #11
0
 protected void Wave(Payloader <SC_Wave> payloader)
 {
     payloader.Callback(
         success: (data) =>
     {
         StartCoroutine(WaveMonster(8f));
     });
 }
Exemple #12
0
    protected void CreateCube(Payloader <SC_CreateCube> payloader)
    {
        payloader.Callback(
            success: (data) =>
        {
            GetTeam(data.Id)?.CreateCube(data.NewCube);

            Router.Refresh();
        });
    }
Exemple #13
0
    private void Loading(Payloader <SC_Loading> payloader)
    {
        payloader.Callback(
            success: (data) =>
        {
            ServerInfo.GameUsers = data.Users;

            SceneManager.LoadScene("MultiGame", LoadSceneMode.Single);
        });
    }
Exemple #14
0
    private void Login(Payloader <SC_Login> payloader)
    {
        payloader.Callback(
            success: (data) =>
        {
            ServerInfo.isLogin = true;

            Router.CloseAndOpen("LobbyView/PlayView");
        });
    }
Exemple #15
0
    protected void UpdateSlot(Payloader <SC_UpdateSlot> payloader)
    {
        payloader.Callback(
            success: (data) =>
        {
            GetTeam(data.Id)?.UpdateSlot(data.SlotIndex, data.SlotLv);

            Router.Refresh();
        });
    }
Exemple #16
0
    protected void DieMonster(Payloader <SC_DieMonster> payloader)
    {
        payloader.Callback(
            success: (data) =>
        {
            GetTeam(data.Id)?.DieMonster(data.MonsterSeq);

            Router.Refresh();
        });
    }
Exemple #17
0
    protected void EscapeMonster(Payloader <SC_EscapeMonster> payloader)
    {
        payloader.Callback(
            success: (data) =>
        {
            GetTeam(data.Id)?.EscapeMonster(data.MonsterSeq);

            Router.Refresh();

            CheckResult();
        });
    }
Exemple #18
0
    protected virtual void Result(Payloader <SC_Result> payloader)
    {
        payloader.Callback(
            success: (data) =>
        {
            GetTeams().ForEach(x => x.UnRegister());

            ServerInfo.GameUsers = data.Users;

            Router.Open("ResultView");

            var my = ServerInfo.MyGameUser();
            LobbyServer.sInstance.UpdateMoney(my.Id, my.Money);
        });
    }
Exemple #19
0
    protected override void Result(Payloader <SC_Result> payloader)
    {
        payloader.Callback(
            success: (data) =>
        {
            GetTeams().ForEach(x => x.UnRegister());

            ServerInfo.GameUsers = data.Users;
            ServerInfo.GameUsers.FirstOrDefault().Id   = tempUserId;
            ServerInfo.GameUsers.FirstOrDefault().Name = tempUserName;
            ServerInfo.User.Id   = tempUserId;
            ServerInfo.User.Name = tempUserName;

            Router.Open("ResultView");
        });
    }
Exemple #20
0
    private void SuccessMatch(Payloader <SC_SuccessMatch> payloader)
    {
        payloader.Callback(
            success: (data) =>
        {
            var slots = ServerInfo.User.Entry.Slots.ToList().Select((x, i) =>
            {
                var cube = ServerInfo.User.Cubes.Find(c => c.CubeId == x);

                return(new GameSlot()
                {
                    SlotIndex = (byte)i,
                    CubeId = cube.CubeId,
                    CubeLv = cube.Lv,
                });
            }).ToList();

            GameServer.sInstance?.EnterRoom(data.GroupName, new RoomUser()
            {
                Id    = ServerInfo.User.Id,
                Slots = slots,
            });
        });
    }