Exemplo n.º 1
0
    private void ResetGame()
    {
        if (Player == null)
        {
            Player = new PlatoonPlayer(playerPlayArea, false);
        }
        else
        {
            Player.Initialize();
        }

        if (Opponent == null)
        {
            Opponent = new PlatoonPlayer(opponentPlayArea, true);
        }
        else
        {
            Opponent.Initialize();
        }

        CardPool.Instance.ReturnAllToPool();
        cardDeck.ResetDeck();
        numRoundsBattled = 0;
        ShowMessage("", 1f);
    }
Exemplo n.º 2
0
    private void DealCardTo(PlatoonPlayer platoonPlayer)
    {
        Card card = cardDeck.GetRandomCard();

        platoonPlayer.AddCardToHand(card);

        card.HideImmediately(true);
        card.gameObject.SetActive(true);

        Vector2 startPos = new Vector2(10f, 0f);
        Vector2 endPos   = platoonPlayer.playArea.Center + Random.insideUnitCircle * 1.5f;

        StartCoroutine(card.MoveFromTo(startPos, endPos, 0.8f));
    }