示例#1
0
 /// <summary>
 /// 接收确认选择的响应
 /// </summary>
 /// <param name="response"></param>
 public override void OnOperationResponse(OperationResponse response)
 {
     if (response.ReturnCode != (short)ReturnCode.Falied)
     {
         int playerId = (int)response.Parameters[(byte)ParameterCode.PlayerId];
         // 刷新准备的数据
         SelectData.Instance.OnReady(playerId);
         m_SelectPanel.UpdateView();
     }
 }
示例#2
0
    /// <summary>
    /// 接收选人房间内当前的数据
    /// </summary>
    /// <param name="response"></param>
    public override void OnOperationResponse(OperationResponse response)
    {
        // 获取队伍数据
        DtoSelect[] team1 = JsonMapper.ToObject <DtoSelect[]>(
            response.Parameters[(byte)ParameterCode.TeamOneSelectData] as string);
        DtoSelect[] team2 = JsonMapper.ToObject <DtoSelect[]>(
            response.Parameters[(byte)ParameterCode.TeamTwoSelectData] as string);

        // 初始化选人数据
        SelectData.Instance.InitData(team1, team2);

        // 更新界面
        m_SelectPanel.UpdateView();
        // 初始化选人层
        m_SelectPanel.InitSelectHeros(GameData.Player.HeroIds);
    }