コード例 #1
0
ファイル: ScoreboardPlayer.cs プロジェクト: Alan-Baylis/VOX
        public void Refresh()
        {
            if (!gameObject.activeInHierarchy)
            {
                needsToRefresh = true;
                return;
            }

            needsToRefresh = false;

            transform.SetParent(
                ServerController.GetObjectFromTeam <GameObject>(
                    player.GetTeam(), scoreboard.redTeamGroup, scoreboard.blueTeamGroup, scoreboard.noneTeamGroup
                    ).transform
                );

            transform.localScale = Vector3.one;

            back.color = PhotonNetwork.player == player ? ownerColor : defaultColor;

            usernameText.text = player.NickName;

            int wins   = ServerController.GetPoints(player);
            int kills  = ServerController.GetKills(player);
            int deaths = ServerController.GetDeaths(player);

            scoreText.text = string.Format("{0}/{1}/{2}", kills, deaths, wins);
        }
コード例 #2
0
ファイル: PunTeams.cs プロジェクト: nonconforme/AoTMod
    public void UpdateTeams()
    {
        IEnumerator enumerator = Enum.GetValues(typeof(Team)).GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                object current = enumerator.Current;
                PlayersPerTeam[(Team)((byte)current)].Clear();
            }
        }
        finally
        {
            IDisposable disposable = enumerator as IDisposable;
            if (disposable == null)
            {
            }
            disposable.Dispose();
        }
        for (int i = 0; i < PhotonNetwork.playerList.Length; i++)
        {
            PhotonPlayer player = PhotonNetwork.playerList[i];
            Team         team   = player.GetTeam();
            PlayersPerTeam[team].Add(player);
        }
    }
コード例 #3
0
    protected void RpcChangePlayerTeam(string id)
    {
        PhotonPlayer foundPlayer = GetPlayerById(id);

        if (foundPlayer != null)
        {
            bool isTeamGameplay = gameRule != null && gameRule.IsTeamGameplay;
            if (!isTeamGameplay)
            {
                foundPlayer.SetTeam(PunTeams.Team.none);
            }
            else
            {
                var maxPlayerEachTeam = PhotonNetwork.room.MaxPlayers / 2;
                switch (foundPlayer.GetTeam())
                {
                case PunTeams.Team.red:
                    if (PunTeams.PlayersPerTeam[PunTeams.Team.blue].Count < maxPlayerEachTeam)
                    {
                        foundPlayer.SetTeam(PunTeams.Team.blue);
                    }
                    break;

                default:
                    if (PunTeams.PlayersPerTeam[PunTeams.Team.red].Count < maxPlayerEachTeam)
                    {
                        foundPlayer.SetTeam(PunTeams.Team.red);
                    }
                    break;
                }
            }
        }
    }
コード例 #4
0
 private void UpdatePlayerUI(PhotonPlayer player)
 {
     PunTeams.Team team = player.GetTeam();
     if (waitingPlayers.ContainsKey(player.UserId))
     {
         if (team != PunTeams.Team.none)
         {
             // If player team changed, recreate waiting player UI
             CreatePlayerUI(player);
             return;
         }
         waitingPlayers[player.UserId].SetData(this, player);
     }
     if (waitingTeamAPlayers.ContainsKey(player.UserId))
     {
         if (team != PunTeams.Team.red)
         {
             // If player team changed, recreate waiting player UI
             CreatePlayerUI(player);
             return;
         }
         waitingTeamAPlayers[player.UserId].SetData(this, player);
     }
     if (waitingTeamBPlayers.ContainsKey(player.UserId))
     {
         if (team != PunTeams.Team.blue)
         {
             // If player team changed, recreate waiting player UI
             CreatePlayerUI(player);
             return;
         }
         waitingTeamBPlayers[player.UserId].SetData(this, player);
     }
 }
コード例 #5
0
ファイル: PunTeams.cs プロジェクト: Smoothstep/VRChat
    // Token: 0x06003F10 RID: 16144 RVA: 0x0013DE5C File Offset: 0x0013C25C
    public void UpdateTeams()
    {
        Array       values     = Enum.GetValues(typeof(PunTeams.Team));
        IEnumerator enumerator = values.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                object obj = enumerator.Current;
                PunTeams.PlayersPerTeam[(PunTeams.Team)obj].Clear();
            }
        }
        finally
        {
            IDisposable disposable;
            if ((disposable = (enumerator as IDisposable)) != null)
            {
                disposable.Dispose();
            }
        }
        for (int i = 0; i < PhotonNetwork.playerList.Length; i++)
        {
            PhotonPlayer  photonPlayer = PhotonNetwork.playerList[i];
            PunTeams.Team team         = photonPlayer.GetTeam();
            PunTeams.PlayersPerTeam[team].Add(photonPlayer);
        }
    }
コード例 #6
0
    // 나 제외
    public void PlayerJoinedRoom(PhotonPlayer photonPlayer)
    {
        if (photonPlayer.Equals(null))
        {
            return;
        }
        GameObject otherPlayer;

        //로컬플레이어가 아니면 로컬플레이어가 속한 팀에따라 좌우를 나눔
        if (me.GetTeam() != photonPlayer.GetTeam())
        {
            otherPlayer = Instantiate(enemyTeamPlayerPrefab);
            otherPlayer.transform.SetParent(enemyTeamViewPort.transform, false);
        }
        else
        {
            otherPlayer = Instantiate(ourTeamPlayerPrefab);
            otherPlayer.transform.SetParent(ourTeamViewPort.transform, false);
        }

        SelectListing selectListing = otherPlayer.GetComponent <SelectListing>();

        selectListings.Add(selectListing);

        selectListing.PhotonPlayer = photonPlayer;
        selectListing.ApplyPhotonPlayer(photonPlayer);
    }
コード例 #7
0
    private void CreatePlayerUI(PhotonPlayer player)
    {
        string key = player.UserId;

        DestroyPlayerUI(key);

        PunTeams.Team team      = player.GetTeam();
        Transform     container = waitingPlayerListContainer;
        Dictionary <string, UIPhotonWaitingPlayer> uiDict = waitingPlayers;

        switch (team)
        {
        case PunTeams.Team.red:
            container = waitingPlayerTeamAListContainer;
            uiDict    = waitingTeamAPlayers;
            break;

        case PunTeams.Team.blue:
            container = waitingPlayerTeamBListContainer;
            uiDict    = waitingTeamBPlayers;
            break;
        }
        UIPhotonWaitingPlayer newEntry = Instantiate(waitingPlayerPrefab, container);

        newEntry.SetData(this, player);
        newEntry.gameObject.SetActive(true);
        uiDict.Add(key, newEntry);

        players[player.UserId] = player;
    }
コード例 #8
0
        /// <summary>
        /// Update button color and text
        /// </summary>
        public void UpdateButton()
        {
            assignedPlayer = null;
            for (int i = 0; i < PhotonNetwork.playerList.Length; i++)
            {
                PhotonPlayer  player     = PhotonNetwork.playerList[i];
                PunTeams.Team playerTeam = player.GetTeam();
                PunTeams.Role playerRole = player.GetRole();

                if ((playerTeam == team) && (playerRole == role))
                {
                    assignedPlayer = player;
                    break;
                }
            }

            if (assignedPlayer != null)
            {
                image.color = Color.red;
                text.text   = assignedPlayer.NickName;
            }
            else
            {
                image.color = Color.green;
                text.text   = "<empty>";
            }
        }
コード例 #9
0
ファイル: Game.cs プロジェクト: DenDev-B/Invasion
    public void onKill(int who)
    {
        //  Debug.Log("kill " + who);
        if (!PhotonNetwork.isMasterClient)
        {
            return;
        }
        PhotonPlayer oPlayer = null;
        int          id;//, a=0, b=0;

        for (int pl = 0; pl < PhotonNetwork.playerList.Length; pl++)
        {
            if (PhotonNetwork.playerList[pl].ID == who)
            {
                id      = pl;
                oPlayer = PhotonNetwork.playerList[pl];
                if (oPlayer.GetTeam() == PunTeams.Team.blue)
                {
                    aKill++;
                }
                else
                {
                    bKill++;
                }
                break;
            }
        }
        photonView.RPC("resetKillCommand", PhotonTargets.All, aKill, bKill);

        if (oPlayer is PhotonPlayer)
        {
            photonView.RPC("addKill", oPlayer);
        }
    }
コード例 #10
0
    // 나 제외
    public void PlayerJoinedRoom(PhotonPlayer photonPlayer)
    {
        if (photonPlayer.Equals(null))
        {
            return;
        }
        GameObject SelectingPrefab;

        //로컬플레이어가 아니면 로컬플레이어가 속한 팀에따라 좌우를 나눔
        if (LocalPlayer.GetTeam() != photonPlayer.GetTeam())
        {
            SelectingPrefab = Instantiate(ChampSelectingPrefab_Enemy);
            SelectingPrefab.transform.SetParent(EnemyTeamViewPort.transform, false);
        }
        else
        {
            SelectingPrefab = Instantiate(ChampSelectingPrefab);
            SelectingPrefab.transform.SetParent(MyTeamViewPort.transform, false);
        }

        SelectListing selectListing = SelectingPrefab.GetComponent <SelectListing>();

        selectListings.Add(selectListing);

        selectListing.PhotonPlayer = photonPlayer;
        selectListing.ApplyPhotonPlayer(photonPlayer);
    }
コード例 #11
0
 public void PlayerTeamChange(PhotonPlayer player)
 {
     foreach (var playerPrefab in playerListings)
     {
         if (playerPrefab.PhotonPlayer.Equals(player))
         {
             if (player.GetTeam().Equals(PunTeams.Team.red) && team2Count < PhotonNetwork.room.MaxPlayers / 2)
             {
                 BlueTeamJoin(player);
             }
             else if (player.GetTeam().Equals(PunTeams.Team.blue) && team1Count < PhotonNetwork.room.MaxPlayers / 2)
             {
                 RedTeamJoin(player);
             }
             break;
         }
     }
     JoinButtonUpdate();
 }
コード例 #12
0
        /// <summary>
        /// Called when a remote player left the room.
        /// See the official Photon docs for more details.
        /// </summary>
        public override void OnPhotonPlayerDisconnected(PhotonPlayer player)
        {
            //only let the master client handle this connection
            if (!PhotonNetwork.isMasterClient)
            {
                return;
            }

            //decrease the team fill for the team of the leaving player and update room properties
            PhotonNetwork.room.AddSize(player.GetTeam(), -1);
        }
コード例 #13
0
ファイル: ConditionalScript.cs プロジェクト: Brotor/zwtg2016
    public void OnPhotonPlayerPropertiesChanged(object[] playerAndUpdatedProps)
    {
        PhotonPlayer player = playerAndUpdatedProps[0] as PhotonPlayer;

        if (player == PhotonNetwork.player)
        {
            if (player.GetTeam() == team)
            {
                addComponentScripts();
            }
        }
    }
コード例 #14
0
 //Return "Blue" or "Red"
 public static string getStringTeam(this PhotonPlayer player)
 {
     PunTeams.Team playerTeam = player.GetTeam();
     if (playerTeam == PunTeams.Team.blue)
     {
         return("Blue");
     }
     else
     {
         return("Red");
     }
 }
コード例 #15
0
ファイル: KillfeedItem.cs プロジェクト: Alan-Baylis/VOX
        public void Set(PhotonPlayer dead, string customReason)
        {
            killerText.gameObject.SetActive(false);
            weaponIcon.gameObject.SetActive(false);
            customReasonText.gameObject.SetActive(true);
            headshotIcon.SetActive(false);

            customReasonText.text = customReason;

            deadText.text  = dead.NickName;
            deadText.color = ServerController.GetObjectFromTeam <Color>(dead.GetTeam(), redTeamColor, blueTeamColor, noneTeamColor);
        }
コード例 #16
0
ファイル: PunTeams.cs プロジェクト: rnetiks/CyanModSRC
 public void UpdateTeams()
 {
     foreach (object obj2 in Enum.GetValues(typeof(Team)))
     {
         PlayersPerTeam[(Team)((byte)obj2)].Clear();
     }
     for (int i = 0; i < PhotonNetwork.playerList.Length; i++)
     {
         PhotonPlayer player = PhotonNetwork.playerList[i];
         Team         team   = player.GetTeam();
         PlayersPerTeam[team].Add(player);
     }
 }
コード例 #17
0
    public void EndRound(PhotonPlayer winner)
    {
        if (!complete)
        {
            if (PhotonNetwork.isMasterClient && !scoreAdded)
            {
                if (winner.GetTeam() == PunTeams.Team.red)
                {
                    AddScoreRed();
                }
                else
                if (winner.GetTeam() == PunTeams.Team.blue)
                {
                    AddScoreBlue();
                }
                scoreAdded = true;
            }
            if ((round < 10 || Tie()) && Reachable())
            {
                Invoke("NewRound", 3f);
                updateHudInfo();
                aba.gameObject.SetActive(true);
                aba.NextRound(Tie() && round >= 10);
            }
            else
            {
                if (PhotonNetwork.isMasterClient)
                {
                    updateHudInfo();
                    aba.gameObject.SetActive(true);

                    //Set winner decision here
                    GetStanding();
                    photonView.RPC("EndGame", PhotonTargets.AllViaServer);
                }
            }
            complete = true;
        }
    }
コード例 #18
0
 // Token: 0x06000609 RID: 1545 RVA: 0x000221D4 File Offset: 0x000203D4
 public void UpdateTeams()
 {
     foreach (object obj in Enum.GetValues(typeof(PunTeams.Team)))
     {
         PunTeams.PlayersPerTeam[(PunTeams.Team)obj].Clear();
     }
     for (int i = 0; i < PhotonNetwork.playerList.Length; i++)
     {
         PhotonPlayer  photonPlayer = PhotonNetwork.playerList[i];
         PunTeams.Team team         = photonPlayer.GetTeam();
         PunTeams.PlayersPerTeam[team].Add(photonPlayer);
     }
 }
コード例 #19
0
    public void AddToKillFeed(PhotonPlayer killer, PhotonPlayer victim)
    {
        GameObject t    = Instantiate(killFeedPrefab, killFeedPanel.transform) as GameObject;
        string     red  = "<color=#ff0000ff>";
        string     blue = "<color=#00ffffff>";

        if (killer.GetTeam() == PunTeams.Team.red)
        {
            t.GetComponentInChildren <Text>().text = red + killer.NickName + " </color> " +
                                                     RandomVerb() + blue + " " + victim.NickName + "</color>";
        }
        else if (killer.GetTeam() == PunTeams.Team.blue)
        {
            t.GetComponentInChildren <Text>().text = blue + killer.NickName + " </color> " +
                                                     RandomVerb() + red + " " + victim.NickName + "</color>";
        }
        else
        {
            t.GetComponentInChildren <Text>().text = killer.NickName + " " +
                                                     RandomVerb() + " " + victim.NickName;
        }
    }
コード例 #20
0
ファイル: PlayerListing.cs プロジェクト: N8-Des/Dont-Get-Hit
 public void OnClick_SetTeam()
 {
     if (PhotonNetwork.isMasterClient || PhotonNetwork.player.ID == photonPlayer.ID)
     {
         if (photonPlayer.GetTeam() == PunTeams.Team.red)
         {
             if (PunTeams.PlayersPerTeam.TryGetValue(PunTeams.Team.blue, out b))
             {
                 if (b.Count >= 5)
                 {
                 }
                 else
                 {
                     button.color = new Color32(92, 171, 229, 254);
                     photonPlayer.SetTeam(PunTeams.Team.blue);
                     teamSet = PunTeams.Team.blue;
                     pnet.GetComponent <PhotonView>().RPC("RPC_ChangeList", PhotonTargets.All, photonPlayer);
                 }
             }
         }
         else
         {
             if (PunTeams.PlayersPerTeam.TryGetValue(PunTeams.Team.red, out r))
             {
                 if (r.Count >= 5)
                 {
                 }
                 else
                 {
                     button.color = new Color32(254, 73, 92, 254);
                     photonPlayer.SetTeam(PunTeams.Team.red);
                     teamSet = PunTeams.Team.red;
                     pnet.GetComponent <PhotonView>().RPC("RPC_ChangeList", PhotonTargets.All, photonPlayer);
                 }
             }
         }
     }
 }
コード例 #21
0
 public override void OnPhotonPlayerConnected(PhotonPlayer newPlayer)
 {
     if (PhotonNetwork.isMasterClient)
     {
         if (newPlayer.GetTeam().ToString().Equals("red"))
         {
             PlayerCreator.instance.Redplayer.Add(newPlayer);
         }
         else
         {
             PlayerCreator.instance.Blueplayer.Add(newPlayer);
         }
     }
 }
コード例 #22
0
 public void PlayerTeamSych(PhotonPlayer player)
 {
     foreach (var playerPrefab in playerListings)
     {
         if (playerPrefab.PhotonPlayer.Equals(player))
         {
             if (player.GetTeam().Equals(PunTeams.Team.red) && Team2_playerCount < PhotonNetwork.room.MaxPlayers / 2)
             {
                 PlayerLeftRoom(player);
                 //블루팀(2팀) 입장
                 BlueTeamJoin(player);
             }
             else if (player.GetTeam().Equals(PunTeams.Team.blue) && Team1_playerCount < PhotonNetwork.room.MaxPlayers / 2)
             {
                 PlayerLeftRoom(player);
                 //레드팀(1팀) 입장
                 RedTeamJoin(player);
             }
             break;
         }
     }
     JoinButtonUpdate();
 }
コード例 #23
0
 public static void SetTeam(this PhotonPlayer player, PunTeams.Team team)
 {
     if (!PhotonNetwork.connectedAndReady)
     {
         Debug.LogWarning("JoinTeam was called in state: " + PhotonNetwork.connectionStateDetailed + ". Not connectedAndReady.");
         return;
     }
     PunTeams.Team team2 = player.GetTeam();
     if (team2 != team)
     {
         Hashtable hashtable = new Hashtable();
         hashtable.Add("team", (byte)team);
         player.SetCustomProperties(hashtable, null, false);
     }
 }
コード例 #24
0
ファイル: PunTeams.cs プロジェクト: xRainCloud/guardian
    public void UpdateTeams()
    {
        Array values = Enum.GetValues(typeof(Team));

        foreach (object item in values)
        {
            PlayersPerTeam[(Team)(byte)item].Clear();
        }
        for (int i = 0; i < PhotonNetwork.playerList.Length; i++)
        {
            PhotonPlayer photonPlayer = PhotonNetwork.playerList[i];
            Team         team         = photonPlayer.GetTeam();
            PlayersPerTeam[team].Add(photonPlayer);
        }
    }
コード例 #25
0
ファイル: PunTeams.cs プロジェクト: matbecker/KrohmaShift
    public void UpdateTeams()
    {
        Array enumVals = Enum.GetValues(typeof(Team));

        foreach (var enumVal in enumVals)
        {
            PlayersPerTeam[(Team)enumVal].Clear();
        }

        for (int i = 0; i < PhotonNetwork.playerList.Length; i++)
        {
            PhotonPlayer player     = PhotonNetwork.playerList[i];
            Team         playerTeam = player.GetTeam();
            PlayersPerTeam[playerTeam].Add(player);
        }
    }
コード例 #26
0
ファイル: RoomTeams.cs プロジェクト: Kattoor/Stadsspel
        public void UpdateTeams()
        {
            Array enumVals = Enum.GetValues(typeof(TeamID));

            for (int i = 0; i < TeamData.GetMaxTeams(PhotonNetwork.room.MaxPlayers) + 1; i++)
            {
                PlayersPerTeam[(TeamID)enumVals.GetValue(i)].Clear();
            }

            for (int i = 0; i < PhotonNetwork.playerList.Length; i++)
            {
                PhotonPlayer player     = PhotonNetwork.playerList[i];
                TeamID       playerTeam = player.GetTeam();
                PlayersPerTeam[playerTeam].Add(player);
            }
        }
コード例 #27
0
 private void SpellEffectSync(byte eventCode, object content, int senderId)
 {
     if (eventCode.Equals(sendcode) || eventCode.Equals(sendIgnitecode) || eventCode.Equals(sendHealcode))
     {
         object[]   receivedData = content as object[];
         GameObject temp;
         sender     = PhotonPlayer.Find(senderId);
         senderteam = sender.GetTeam().ToString().ToLower();
         if (eventCode.Equals(sendcode))
         {
             if (receivedData.Length.Equals(3))
             {
                 GetSpell((string)receivedData[0], (Vector3)receivedData[1], (string)receivedData[2]);
             }
             else if (receivedData.Length.Equals(4))
             {
                 if ((int)receivedData[3] != 0)
                 {
                     int viewid = (int)receivedData[3];
                     temp = PhotonView.Find(viewid).gameObject;
                     GetSpell((string)receivedData[0], (Vector3)receivedData[1], (string)receivedData[2], viewid);
                 }
                 else
                 {
                     GetSpell((string)receivedData[0], (Vector3)receivedData[1], (string)receivedData[2]);
                 }
             }
         }
         else if (eventCode.Equals(sendIgnitecode)) //점화 동기화
         {
             IgniteAtked = PhotonView.Find((int)receivedData[0]).gameObject;
             if (IgniteAtked.GetComponent <PhotonView>().owner == PhotonNetwork.player)
             {
                 isIgnite      = true;
                 Attackerlevel = (int)receivedData[1];
                 IgniteAtker   = PhotonView.Find((int)receivedData[2]).gameObject;
             }
         }
         else if (eventCode.Equals(sendHealcode))//힐 동기화
         {
             if (PhotonView.Find((int)receivedData[0]).gameObject.GetComponent <PhotonView>().owner == photonview.owner)
             {
                 SyncHeal((float)receivedData[1], (string)receivedData[2]);
             }
         }
     }
 }
コード例 #28
0
ファイル: PunTeams.cs プロジェクト: matbecker/KrohmaShift
    /// <summary>Switch that player's team to the one you assign.</summary>
    /// <remarks>Internally checks if this player is in that team already or not. Only team switches are actually sent.</remarks>
    /// <param name="player"></param>
    /// <param name="team"></param>
    public static void SetTeam(this PhotonPlayer player, PunTeams.Team team)
    {
        if (!PhotonNetwork.connectedAndReady)
        {
            Debug.LogWarning("JoinTeam was called in state: " + PhotonNetwork.connectionStateDetailed + ". Not connectedAndReady.");
            return;
        }

        PunTeams.Team currentTeam = player.GetTeam();
        if (currentTeam != team)
        {
            player.SetCustomProperties(new Hashtable()
            {
                { PunTeams.TeamPlayerProp, (byte)team }
            });
        }
    }
コード例 #29
0
    // Called by AlucardW_Trigger by the Master Client
    public void OnTrigger(Entity entity)
    {
        PhotonView   targetView = entity.GetComponent <PhotonView>();
        PhotonPlayer target     = targetView.owner;

        if (entity.team != attacker.GetTeam())
        {
            if (entity.GetComponent <PlayerChampion>() != null)
            {
                targetView.RPC("Damage", PhotonTargets.AllBuffered, damageBase, attackerIdBase);
            }
            else if (entity.GetComponent <Minion>() != null)
            {
                targetView.RPC("EntityDamage", PhotonTargets.AllBuffered, damageBase, attackerIdBase);
            }
        }
    }
コード例 #30
0
        /// <summary>
        /// Update list of players without team
        /// </summary>
        public void UpdatePlayerList()
        {
            string list = "";

            for (int i = 0; i < PhotonNetwork.playerList.Length; i++)
            {
                PhotonPlayer  player = PhotonNetwork.playerList[i];
                PunTeams.Team team   = player.GetTeam();
                if (team == PunTeams.Team.none)
                {
                    //players.Add(player);
                    list += "\n" + player.NickName;
                }
            }

            text.text = list;
        }
コード例 #31
0
 /**
  * Assign team for this single player
  *
  * Arguments
  * - PhotonPlayer currentPlayer - The current player to set team
  * - int index - The index of this player
  */
 void assignTeam(PhotonPlayer currentPlayer, int index)
 {
     if (index == alienIndex && currentPlayer.GetTeam() != PunTeams.Team.red) { // Player needs to be an alien
         Debug.Log("Setting " + currentPlayer.name + " to be the alien");
         if (currentPlayer == PhotonNetwork.player) // Just set our own team
             currentPlayer.SetTeam(PunTeams.Team.red);
         else // Need RPC call
             GetComponent<PhotonView>().RPC("SetPlayerTeam", currentPlayer, new object[] {PunTeams.Team.red});
     } else if (index != alienIndex && currentPlayer.GetTeam() != PunTeams.Team.blue) {
         Debug.Log("Setting " + currentPlayer.name + " to be a human");
         if (currentPlayer == PhotonNetwork.player) // Just set our own team
             currentPlayer.SetTeam(PunTeams.Team.blue);
         else // Player needs to be an alien
             GetComponent<PhotonView>().RPC("SetPlayerTeam", currentPlayer, new object[] {PunTeams.Team.blue});
     }
 }