Пример #1
0
    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);
    }
Пример #2
0
    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());
    }
Пример #3
0
 void AttachToHolding(GameEntity p, GameEntity c)
 {
     Companies.AttachToGroup(Q, p, c);
 }