private void Awake() { foreach (Player p in PhotonNetwork.PlayerList) { MyPlayer aplayer = new MyPlayer(); aplayer.PlayerId = p.ActorNumber.ToString(); aplayer.PlayerName = p.NickName; int pos = CaluclatePositions(p.ActorNumber, PhotonNetwork.LocalPlayer.ActorNumber); if (pos == 0) { aplayer.IsLocalPlayer = true; localPlayer = aplayer; } aplayer.Position = PlayerPositions[pos].position; aplayer.playerAngle = CaluclatePlayerAngle(pos); aplayer.playerScale = CaluclatePlayerScale(pos); MyPlayers.Add(p.ActorNumber, aplayer); } leastCountManager = new LeastCountManager(MyPlayers); cardAnimator = FindObjectOfType <CardAnimator>(); }
private void Awake() { foreach (Player p in PhotonNetwork.PlayerList) { MyPlayer aplayer = new MyPlayer(); aplayer.PlayerId = p.ActorNumber.ToString(); aplayer.PlayerName = "declearation"; Debug.Log("Player p1" + p.ActorNumber); Debug.Log("Player name" + aplayer.PlayerName + "Nickname" + p.NickName); // Debug.Log("Player p" + PhotonNetwork.LocalPlayer.ActorNumber); int pos = CaluclatePositions(p.ActorNumber, PhotonNetwork.LocalPlayer.ActorNumber); if (pos == 0) { aplayer.IsLocalPlayer = true; localPlayer = aplayer; } aplayer.Position = PlayerPositions[pos].position; MyPlayers.Add(p.ActorNumber, aplayer); Debug.Log("aplaer position" + aplayer.Position); } leastCountManager = new LeastCountManager(MyPlayers); cardAnimator = FindObjectOfType <CardAnimator>(); }