public override void Execute() { string name = "Company Group #" + Companies.GenerateCompanyId(Q); int groupId = Companies.GenerateCompanyGroup(Q, name).company.Id; Companies.AttachToGroup(Q, MyGroupEntity.company.Id, groupId); }
void IEndDragHandler.OnEndDrag(PointerEventData eventData) { if (targetItem) { Debug.Log("We will merge companies!"); int parent = GetCompanyIdByGameObject(targetItem); int subsidiary = GetCompanyIdByGameObject(itemBeingDragged); Companies.AttachToGroup(Q, parent, subsidiary); } itemBeingDragged = null; Debug.Log("OnEndDrag " + GetCompanyName()); }
void AttachToHolding(GameEntity p, GameEntity c) { Companies.AttachToGroup(Q, p, c); }