Пример #1
0
 public void OpenDeckSimulator()
 {
     // UI -> include DeckData.Load
     UI     = Instantiate(UI) as GameObject;
     deckUI = DeckUI.GetInstance();
     DeckSettingUI.synchronizeAll();
 }
Пример #2
0
 //loop function ( All Deck Setting UI )
 public static DeckSettingUI SearchEnterMouseObject(Vector2 pos)
 {
     foreach (DeckSettingUI obj in deckSettingList)
     {
         DeckSettingUI res = obj.SearchObject(pos);
         if (res != null)
         {
             return(res);
         }
     }
     return(null);
 }
Пример #3
0
    void IEndDragHandler.OnEndDrag(PointerEventData eve)
    {
        if (dragType == "vertical")
        {
            DeckSettingUI selectedDeck;
            DeckUI        deckUI = DeckUI.GetInstance();

            if (selectedDeck = DeckSettingUI.SearchEnterMouseObject(eve.position))
            {
                selectedDeck.SetCardIndex(deckUI.readonlyCardList[selectedIndex]);
            }
            else
            {
                DeckSlot selectedSlot = DeckSlot.GetSlotByCard(deckUI.readonlyCardList[selectedIndex]);
                selectedSlot.SlotFree();
                selectedIndex = -1;
            }
            Destroy(currentSelectedItem.gameObject);
        }
        prePos   = Vector2.zero;
        dragType = "";
    }