Esempio n. 1
0
    public void Initialize(DeckBuilder parent, CardPlayerData general)
    {
        _deckBuilder = parent;
        generalData  = general;

        SetUpVisuals();
    }
Esempio n. 2
0
    public void AssignCustom1Deck(DeckData data)
    {
        DeckAssignmentHelper(custom1Grimoire, custom1Domain, defaultSoulCrypt);

        player.SetUpDecks();

        CardPlayerData playerData = data.GetGeneral();

        List <CardData> decklist = data.GetCardData();

        StartCoroutine(FillCustomDeckLists(playerData, decklist));
    }
Esempio n. 3
0
    public void Initialize(DeckBuilder parent, DeckBuilder.DeckData deckData)
    {
        _deckBuilder = parent;
        _deckData    = deckData;

        if (deckData != null)
        {
            deckList          = _deckData.GetCardData();
            general           = _deckData.GetGeneral();
            faction           = general.faction;
            deckName          = _deckData.deckName;
            deckNameText.text = deckName;
        }
    }
Esempio n. 4
0
        public CardPlayerData GetGeneral()
        {
            CardPlayerData general = null;

            List <CardData> deckList = GetCardData();

            for (int i = 0; i < deckList.Count; i++)
            {
                if (deckList[i] is CardPlayerData)
                {
                    general = (CardPlayerData)deckList[i];
                    break;
                }
            }
            return(general);
        }
Esempio n. 5
0
    public override void OnInspectorGUI()
    {
        CardPlayerData _playerData = (CardPlayerData)target;

        EditorGUILayout.LabelField("General Domains", EditorStyles.boldLabel);
        _playerData.domainPowers = EditorHelper.DrawList("Domains", _playerData.domainPowers, true, null, true, DrawDomainPowers);

        EditorGUILayout.Separator();

        EditorGUILayout.LabelField("Stats", EditorStyles.boldLabel);
        _playerData.attack = EditorGUILayout.IntField("Attack", _playerData.attack);
        _playerData.size   = EditorGUILayout.IntField("Size", _playerData.size);
        _playerData.health = EditorGUILayout.IntField("Health", _playerData.health);


        base.OnInspectorGUI();
    }
Esempio n. 6
0
    private IEnumerator FillCustomDeckLists(CardPlayerData playerData, List <CardData> decklist)
    {
        yield return(new WaitForSeconds(1f));

        if (playerData != null)
        {
            player.activeDomain.GetComponent <Deck>().cards = playerData.domainPowers.Cast <CardData>().ToList();

            //for (int i = 0; i < playerData.domainPowers.Count; i++) {
            //    player.activeDomain.GetComponent<Deck>().cards.Add(playerData.domainPowers[i]);
            //}
        }


        player.activeGrimoire.GetComponent <Deck>().cards = decklist;

        //for (int i = 0; i < decklist.Count; i++) {
        //    player.activeGrimoire.GetComponent<Deck>().cards.Add(decklist[i]);
        //}

        //yield return new WaitForSeconds(1f);

        ShowStartGame();
    }