示例#1
0
    public void Initialize(DeckBuilder parent, CardPlayerData general)
    {
        _deckBuilder = parent;
        generalData  = general;

        SetUpVisuals();
    }
示例#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));
    }
示例#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;
        }
    }
示例#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);
        }
示例#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();
    }
示例#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();
    }