Пример #1
0
    private void UpdateTeamLists()
    {
        ISFSArray arr = new SFSArray();

        redTeam.Clear();
        blueTeam.Clear();
        RoomVariable redVar = smartFox.LastJoinedRoom.GetVariable("red");
        RoomVariable blueVar = smartFox.LastJoinedRoom.GetVariable("blue");
        if(redVar != null) {
            arr = redVar.GetSFSArrayValue();
            for(int i = 0; i < arr.Size(); i++) {
                redTeam.Add(arr.GetUtfString(i));
            }
        }
        if(blueVar != null) {
            arr = blueVar.GetSFSArrayValue();
            for(int i = 0; i < arr.Size(); i++) {
                blueTeam.Add(arr.GetUtfString(i));
            }
        }
    }