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); }
public void RemoveUserCell(UserEnergyCellUIComponent user) { if (this.cells.Contains(user)) { this.cells.Remove(user); } Destroy(user.gameObject); this.UpdateCells(); }
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); }