예제 #1
0
 void onPointerClick(BaseEventData data)
 {
     if (canInteract)
     {
         BattleInfoManager.getInstance().BattleView.useCard(cardInfo);
     }
 }
예제 #2
0
    PlayerCard generateNewCard(bool putInRoll = true)
    {
        PlayerCard card = BattleInfoManager.getInstance().playerDeckManager.DrawNextCard();

        card.cardObject.transform.SetParent(deckParent);
        card.cardObject.transform.localPosition = cardGeneratePosition;
        if (putInRoll)
        {
            cardInRoll.Add(card);
        }
        return(card);
    }
예제 #3
0
    void RemoveCard(int index, bool isUsed)
    {
        PlayerCard oldCard = cardInRoll[index];

        cardInRoll.RemoveAt(index);
        if (isUsed)
        {
            BattleInfoManager.getInstance().playerDeckManager.UseCard(oldCard);
        }
        else
        {
            BattleInfoManager.getInstance().playerDeckManager.RecycleCard(oldCard);
        }
        ResetOldSiblingIndex(index);
    }
예제 #4
0
 public void Start()
 {
     // 此处应初始化场地,卡组等内容
     BattleInfoManager.getInstance().InitBattle(this);
 }