public MarkerAnchorSelector(DraggableButton draggablePad, Func <bool> VREnableGetter)
        {
            AnchorPicker = new MarkerSpatialSelector();

            m_DraggablePad   = draggablePad;
            m_VREnableGetter = VREnableGetter;
        }
Пример #2
0
        public void DragArrownd()
        {
            DraggableButton.Click();
            Actions action = new Actions(this.Driver);

            action.DragAndDropToOffset(this.DraggableObject, 25, 88);
            action.Perform();
        }
Пример #3
0
 public GameObject FindButton(object dragObject)
 {
     foreach (GameObject gameObject in this.buttons)
     {
         DraggableButton component = gameObject.GetComponent <DraggableButton>();
         if (component && component.DragObject == dragObject)
         {
             return(component.gameObject);
         }
     }
     return(null);
 }
Пример #4
0
 public void SetSelection(object targetObject)
 {
     foreach (GameObject gameObject in this.buttons)
     {
         DraggableButton component = gameObject.GetComponent <DraggableButton>();
         if (component && component.DragObject == targetObject)
         {
             this.Select(component, targetObject);
             component.Select();
         }
     }
 }
Пример #5
0
    protected override void OnInitializedButton(int slot, InventoryButton button)
    {
        button.GetComponentInChildren <DraggableButton>().OnDrop.AddListener((ev) =>
        {
            DraggableButton dragged      = ev.pointerDrag.GetComponent <DraggableButton>();
            InventoryButton sourceButton = dragged.GetComponentInParent <InventoryButton>();

            Connection.Instance.SendData(new ItemActionPacket(new ItemActionData()
            {
                sourceSlot      = sourceButton.Slot,
                targetSlot      = slot,
                action          = ItemAction.MOVE,
                sourceContainer = sourceButton.ContainerId,
                targetContainer = button.ContainerId
            }));
        });
    }
Пример #6
0
    private void Start()
    {
        foreach (var item in GetComponentsInChildren <DraggableButton>())
        {
            item.OnDrop.AddListener((ev) =>
            {
                SkillBarSlot slot       = item.GetComponentInParent <SkillBarSlot>();
                DraggableButton dragged = ev.pointerDrag.GetComponent <DraggableButton>();
                slot.Fill(dragged.GetComponentInParent <SkillButton>().skillId);
            });
        }

        slots = GetComponentsInChildren <SkillBarSlot>().ToList();
        for (int i = 0; i < slots.Count; i++)
        {
            slots[i].SetHotkey((i + 1).ToString());
        }
    }