Ejemplo n.º 1
0
        public ContentGroup CreateContentGroup(Director director, List <Actor> actors)
        {
            if (director == null)
            {
                return(null);
            }

            lock (groupLock)
            {
                uint[] initialMembers = null;

                if (actors != null)
                {
                    initialMembers = new uint[actors.Count];
                    for (int i = 0; i < actors.Count; i++)
                    {
                        initialMembers[i] = actors[i].actorId;
                    }
                }

                groupIndexId = groupIndexId | 0x3000000000000000;

                ContentGroup contentGroup = new ContentGroup(groupIndexId, director, initialMembers);
                mContentGroups.Add(groupIndexId, contentGroup);
                groupIndexId++;
                if (initialMembers != null && initialMembers.Length != 0)
                {
                    contentGroup.SendAll();
                }

                return(contentGroup);
            }
        }