Esempio n. 1
0
    public void OpenRetreatViewer()
    {
        //Debug.Log("Open Retreat!");

        //collects the information for the CardViewer
        CardViewerDetails details = new CardViewerDetails
        {
            cardsToDisplay = player.Retreat,
            locationText   = player.playerName + "'s Retreat",
        };

        CardViewerWindow.Instance().ViewCards(details);
    }
Esempio n. 2
0
    public void ViewCards(CardViewerDetails details)
    {
        cardViewerObject.SetActive(true);

        headerText.text = details.locationText;

        Debug.Log("Displaying " + details.cardsToDisplay.Count + " cards in the Card Viewer Window.");

        //populate the display with CardView Prefabs
        for (int i = 0; i < details.cardsToDisplay.Count; i++)
        {
            GameObject newView = cardViewObjectPool.GetObject();
            newView.transform.SetParent(contentPanel);

            CardView2 view = newView.GetComponent <CardView2>();
            view.Setup(details.cardsToDisplay[i]);
        }
    }