Beispiel #1
0
        public void CreateUser(NodeAddedEvent e, SingleNode <UsersEnergyCellsListUIComponent> list, [Combine] UserInSquadNode userInSquad, [JoinBySquad] SelfUserInSquadNode selfUser)
        {
            UserEnergyCellUIComponent component = list.component.AddUserCell();

            userInSquad.userGroup.Attach(component.GetComponent <EntityBehaviour>().Entity);
            this.UpdateSquadTeleportInfo(userInSquad);
        }
Beispiel #2
0
 public void RemoveUserCell(UserEnergyCellUIComponent user)
 {
     if (this.cells.Contains(user))
     {
         this.cells.Remove(user);
     }
     Destroy(user.gameObject);
     this.UpdateCells();
 }
Beispiel #3
0
        public UserEnergyCellUIComponent AddUserCell()
        {
            UserEnergyCellUIComponent item = Instantiate <UserEnergyCellUIComponent>(this.cell);

            item.transform.SetParent(this.content, false);
            item.gameObject.SetActive(true);
            this.cells.Add(item);
            this.UpdateCells();
            return(item);
        }