// Use this for initialization void Awake() { //cursorP1.transform.position = new Vector3(colors[p1CursorPosition].transform.position.x - 15 / (scaler.referenceResolution.x / Screen.width), cursorP1.transform.position.y, cursorP1.transform.position.z); //cursorP2.transform.position = new Vector3(colors[p2CursorPosition].transform.position.x + 15 / (scaler.referenceResolution.x / Screen.width), cursorP2.transform.position.y, cursorP2.transform.position.z); p1Renderer.material.color = colors[p1CursorPosition].GetComponent <Image>().color; p2Renderer.material.color = colors[p2CursorPosition].GetComponent <Image>().color; stage = CharacterSelectStage.CharacterPicking; stageSelectPanel.SetActive(false); }
public void S2C_OnGetPlayerInfoList(Pt _info) { pt_usr_list_a102 pt_usr_list_A102Info = _info as pt_usr_list_a102; loginPlayerDic.Clear(); if (pt_usr_list_A102Info != null) { bool noTargetPlayer = true; uint lastPlayerID = 0; for (int i = 0, max = pt_usr_list_A102Info.usr_list.Count; i < max; i++) { create_usr_info item = pt_usr_list_A102Info.usr_list[i]; PlayerBaseInfo info = new PlayerBaseInfo(item); loginPlayerDic[info.ServerInstanceID] = info; Debug.Log("item.raw_server_id:" + item.raw_server_id + ",loginServerID:" + loginServerID); if (GameCenter.instance.isPlatform) { if (item.raw_server_id.ToString() == loginServerID) { CurSelectPlayerID = (uint)info.ServerInstanceID; noTargetPlayer = false; } } lastPlayerID = (uint)info.ServerInstanceID; } if (noTargetPlayer) { CurSelectPlayerID = lastPlayerID; //容错,没找到目标角色时,取最后一个 } } if (loginPlayerDic.Count > 0)//如果角色数量大于0,则跳转至选择角色状态,否则跳转至创角状态 by吴江 { if (GameCenter.instance.IsReConnecteding) { if (CurSelectPlayerID > 0) { C2S_AskQueue(CurSelectPlayerID); } else { CharacterSelectStage stage = GameCenter.curGameStage as CharacterSelectStage; if (stage != null) { stage.GoToWait(); } else { CharacterCreateStage charaStage = GameCenter.curGameStage as CharacterCreateStage; if (charaStage != null) { charaStage.GoToWait(); } } } return; } else { if (CurSelectPlayerID > 0) { C2S_AskQueue(CurSelectPlayerID); } } } else { if (GameCenter.instance.IsReConnecteding) { CharacterCreateStage stage = GameCenter.curGameStage as CharacterCreateStage; if (stage != null) { stage.GoToWait(); } } else { GameCenter.instance.GoCreatChar(); } } }
private void SwitchToStageSelect() { stage = CharacterSelectStage.StagePicking; StartCoroutine("SwitchToStageSelectCoroutine"); }