void Awake() { // 玩家没发消息时 不显示聊天气泡 chatPaoPao.SetActive(false); instant = this; BGMAudio = GameObject.FindWithTag("BGMaudioManage").GetComponent <AudioSource>(); }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.GetComponentInParent <PlayerItemScript>()) { playerItems = collision.GetComponentInParent <PlayerItemScript>(); //will later be activated via a keypress - the same as for dialogue OpenGate(); } }
void startGame(ClientResponse response) { GlobalDataScript.roomAvatarVoList = avatarList; print(" startGame " + avatarList.Count); StartGameVO sgvo = JsonMapper.ToObject <StartGameVO>(response.message); cleanGameplayUI(); //cleanDesk_dzpk(); 清理十三水扑克桌面 TODO GlobalDataScript.surplusTimes--; if (GlobalDataScript.goldType) { gameNumber.text = GlobalDataScript.playCountForGoldType + ""; } else { gameNumber.text = GlobalDataScript.surplusTimes + "/" + GlobalDataScript.roomVo.roundNumber; } bankerId = sgvo.bankerId; avatarList[bankerId].main = true; PlayerItemScript bankerItem = getPlayItem(bankerId); bankerItem.setbankImgEnable(true); GlobalDataScript.finalGameEndVo = null; initArrayList(); isFirstOpen = false; GlobalDataScript.isOverByPlayer = false; int selfIndex = getMyIndexFromList(); mineList = sgvo.paiArray; setAllPlayerReadImgVisbleToFalse(); //所有玩家发牌移动动画 动画可不要 float time = 0; if (GlobalDataScript.roomVo.AA == false) //德扑发两张牌 { for (int i = 0; i < 13; i++) { for (int j = 0; j < avatarList.Count; j++) { if (avatarList[j].scores > GlobalDataScript.roomVo.initFen_dzpk / 100) { int seat = getIndexByDir(getDirection(j)); StartCoroutine(DisplayFaPaiMove(seat, time, i)); time += 0.4f; } } } } }
private PlayerItemScript getPlayItem(int index) { string dirstr = getDirection(index); PlayerItemScript res = null; switch (dirstr) { case DirectionEnum.Bottom: res = playerItems[0]; break; case DirectionEnum.Right: res = playerItems[1]; break; case DirectionEnum.TopRight: res = playerItems[2]; break; case DirectionEnum.TopLeft: res = playerItems[3]; break; case DirectionEnum.Left: res = playerItems[4]; break; case DirectionEnum.LeftBottom: res = playerItems[5]; break; case DirectionEnum.Player_7: // L- res = playerItems[6]; break; case DirectionEnum.Player_8: res = playerItems[7]; break; case DirectionEnum.Player_9: res = playerItems[8]; break; case DirectionEnum.Player_10: res = playerItems[9]; break; } return(res); } //根据玩家位置 返回位置index
// Use this for initialization void Awake() { instance = this; }
// Use this for initialization void Awake() { instance = this; }