Ejemplo n.º 1
0
        public void SummonGroup()
        {
            string message = SummonGroupInput.GetComponent <Text>().text;

            if (message.Trim() == "")
            {
                uiManagerScript.HideSummonGroupForm();
                return;
            }
            foreach (GroupMember member in currentGroup.members)
            {
                string friendUsername = member.world_user.user.username;
                if (friendUsername == username)
                {
                    continue;
                }
                DatabaseReference reference = FirebaseDatabase.DefaultInstance.RootReference;
                reference.Child("usernameList").Child(friendUsername).GetValueAsync().ContinueWith(task => {
                    DataSnapshot snapshot = task.Result;
                    SendNotification(snapshot.Value.ToString().Trim(), "📣📣 You are being summoned by " + "@" + username.ToLower() + " 📣📣", message);
                });
            }
            SummonGroupInput.GetComponent <Text>().text = "";
            StartCoroutine(uiManagerScript.SuccessSummon());
        }