Ejemplo n.º 1
0
    private void OnAggregatedHeartsEvent(Periscope.AggregatedHeartsEvent ev)
    {
        foreach (Team t in teams)
        {
            if (ev.groupName == t.teamName)
            {
                if (ev.numHearts > 0)
                {
                    Debug.Log(string.Format("Received AggregatedHeartEvent: team: {0}   hearts: {1}", ev.groupName, ev.numHearts));
                }

                t.heartHandler.HandleHearts(ev.numHearts);
            }
        }
    }
Ejemplo n.º 2
0
 public UserGroup(
     string name,
     string color,                             // one of the 13 Periscope tint colors defined in colorToTintIndex
     string profileImageUrl,
     string[] joinMessages,
     string[] leaveMessages,
     string[] groupFullMessages,
     string[] periodicMessages,
     string[] heartResponseMessages,
     string[] chatResponseMessages,
     int maxUsers = 0)
 {
     this.leader                = new User(name, name, profileImageUrl);
     this.tintColor             = color;
     this.maxUsers              = maxUsers;
     this.users                 = new Dictionary <int, User>();
     this.joinMessages          = joinMessages;
     this.leaveMessages         = leaveMessages;
     this.groupFullMessages     = groupFullMessages;
     this.periodicMessages      = periodicMessages;
     this.heartResponseMessages = heartResponseMessages;
     this.chatResponseMessages  = chatResponseMessages;
     this.ev = new AggregatedHeartsEvent(name, 0);
 }