Beispiel #1
0
    public void ChangeSlot(UInt32 dwSlotId)
    {
        GameProto.PlayerRequestLoginChangeSlot oChangeSlot = new GameProto.PlayerRequestLoginChangeSlot();
        oChangeSlot.DwSlotId = dwSlotId;

        SysUtil.SendMessage(m_pSession, oChangeSlot, "GameProto.PlayerRequestLoginChangeSlot");
    }
Beispiel #2
0
    public void OnConnect()
    {
        SampleDebuger.Log("game connected");
        GameData.Instance().Reset();

        GameProto.PlayerRequestGameEnter oRequest = new GameProto.PlayerRequestGameEnter();

        oRequest.QwPlayerId = PlayerData.Instance().proPlayerId;

        SysUtil.SendMessage(m_pSession, oRequest, "GameProto.PlayerRequestGameEnter");
    }
Beispiel #3
0
 public override bool RightRotation()
 {
     if (m_oNextTetris == null)
     {
         return(false);
     }
     if (base.RightRotation())
     {
         GameProto.PlayerRequestRotation oRequest = new GameProto.PlayerRequestRotation();
         oRequest.EDirection = GameProto.ERotationDirection.ErdRight;
         oRequest.FTick      = m_fTick;
         SysUtil.SendMessage(GameControler.Instance().proSession, oRequest, "GameProto.PlayerRequestRotation");
         return(true);
     }
     return(false);
 }
Beispiel #4
0
 public override bool LeftTetris()
 {
     if (m_oNextTetris == null)
     {
         return(false);
     }
     if (base.LeftTetris())
     {
         GameProto.PlayerRequestMove oRequest = new GameProto.PlayerRequestMove();
         oRequest.EDirection = GameProto.EMoveDirection.EmdLeft;
         oRequest.FTick      = m_fTick;
         SysUtil.SendMessage(GameControler.Instance().proSession, oRequest, "GameProto.PlayerRequestMove");
         return(true);
     }
     return(false);
 }
Beispiel #5
0
    public void OnPlayerRequestGameTest(byte[] pBuf)
    {
        GameProto.PlayerRequestGameTest oTest = GameProto.PlayerRequestGameTest.Parser.ParseFrom(pBuf);
        if (oTest == null)
        {
            SampleDebuger.LogYellow("OnTest error parse");
            return;
        }

        SampleDebuger.Log(oTest.SzTest.ToString());

        oTest.SzTest = String.Format("{0}, {1}, {2}, {3}, {4}, {5}",
                                     "sessionobject.cs", 106, "SessionObject::OnRecv", dw1++,
                                     ToString(), DateTime.Now.ToLocalTime().ToString());

        SysUtil.SendMessage(m_pSession, oTest, "GameProto.PlayerRequestGameTest");
    }
Beispiel #6
0
 public void MakeTeam()
 {
     GameProto.PlayerRequestLoginMakeTeam oTeam = new GameProto.PlayerRequestLoginMakeTeam();
     SysUtil.SendMessage(m_pSession, oTeam, "GameProto.PlayerRequestLoginMakeTeam");
 }
Beispiel #7
0
 public void OnlinePlayers()
 {
     GameProto.PlayerRequestLoginOnLinePlayer oTeam = new GameProto.PlayerRequestLoginOnLinePlayer();
     SysUtil.SendMessage(m_pSession, oTeam, "GameProto.PlayerRequestLoginOnLinePlayer");
 }
Beispiel #8
0
    public void TeamStart()
    {
        GameProto.PlayerRequestLoginGameStart oTeam = new GameProto.PlayerRequestLoginGameStart();

        SysUtil.SendMessage(m_pSession, oTeam, "GameProto.PlayerRequestLoginGameStart");
    }