Beispiel #1
0
    public void LoadPlayer(PlayerHolder playerHolder, PlayerStats stats)
    {
        this.playerHolder = playerHolder;

        foreach (CardInstance cardInstance in playerHolder.cardsOnTable)
        {
            Settings.SetParentForCard(cardInstance.viz.gameObject.transform, tableGrid.value.transform);
        }

        foreach (CardInstance cardInstance in playerHolder.cardsOnHand)
        {
            Settings.SetParentForCard(cardInstance.viz.gameObject.transform, handGrid.value.transform);
        }

        foreach (ResourceHolder cardInstance in playerHolder.resourcesList)
        {
            Settings.SetParentForCard(cardInstance.cardObject.transform, resourcesGrid.value.transform);
        }

        playerHolder.playerStats = stats;
        playerHolder.LoadPlayerOnStats();
    }