示例#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);
 }