예제 #1
0
    private IEnumerator Merge(DragAndDrop droppedObject, DragAndDrop otherCard, CellSlot cellSlot)
    {
        battle.MoveCard(otherCard.gameObject, droppedObject.gameObject);
        yield return(new WaitForSeconds(2.2f));

        battle.StopAllCoroutines();
        if (droppedObject != null)
        {
            droppedObject.gameObject.GetComponent <Image>().color = new Color(0.77f, 1f, 0.75f);
            droppedObject.probability += otherCard.probability;
            droppedObject.probability /= 2;
            cellSlot.ClearCards();
        }
        battle.CheckEndOfTurns();
        if (droppedObject.handler == "player")
        {
            BattleBot.singleton.BotTurn();
        }
    }