Beispiel #1
0
    //开始
    public IEnumerator StartBattle()
    {
        yield return(new WaitUntil(() => { return DataReady; }));

        fighting = true;
        state    = RoundState.Begin;

        yield return(new WaitUntil(() => {
            cardpad = (UICardPad)UIManager.Instance.GetPageInstatnce <UICardPad>();
            return cardpad != null;
        }));

        cardpad.ClearTable();
        DealCards();
        CurrentRound = 0;
        if (MathUtil.GetRandom(0, 1) == 1)
        {
            state = RoundState.PlayerRurn;
        }
        else
        {
            state = RoundState.NpcTurn;
        }
        UIRound round = (UIRound)UIPage.GetPageInstatnce <UIRound>();

        round.SetTurnBtn(state == RoundState.PlayerRurn?true:false);
    }
Beispiel #2
0
    public void OnEndDrag(PointerEventData eventData)
    {
        SetDraggedPosition(eventData);
        UICardPad cardpad = (UICardPad)UIManager.Instance.GetPageInstatnce <UICardPad>();

        cardpad.PlayerUseCard(this);
    }