예제 #1
0
 public void Initialize(IFractionsData fractions)
 {
     foreach (var item in fractions.Fractions)
     {
         var button = Instantiate(prefabButton).GetComponent <FractionsButton>();
         button.Assing(transform, item, Select);
         buttons.Add(button);
     }
 }
예제 #2
0
    private Dictionary <string, ICardData> LoadCollectionCard(IFractionsData fractions)
    {
        var cards = new Dictionary <string, ICardData>();

        foreach (var fraction in fractions.Fractions)
        {
            foreach (var item in Resources.LoadAll <CardScriptable>($"Data/Cards/{fraction.Name}/"))
            {
                cards.Add(item.Name, item.Open());
            }
        }
        return(cards);
    }
예제 #3
0
    public void Construct(IDeckFactory deckFactory, IFractionsData fractions,
                          IUserData userDecks, FractionsMenu fractionMenu)
    {
        (this.deckFactory, this.fractions, this.userDecks, this.fractionMenu)
            = (deckFactory, fractions, userDecks, fractionMenu);

        startBattelButton.onClick.AddListener(OnStartBattel);

        if (this.userDecks.CurrentDeck != null)
        {
            fractions.CurrentFraction = fractions.GetFraction(this.userDecks.CurrentDeck.Fraction);
        }

        if (fractions.CurrentFraction.Name == "neutral")
        {
            fractions.CurrentFraction = fractions.Fractions[0];
        }

        fractionMenu.transform.SetParent(transform, false);
        fractionMenu.SetActiveBattons(fractions.Fractions.Where(x => x.Name != "neutral").ToList()).SetListener(SelectFraction);
        fractionMenu.SetSelecedButton(fractions.CurrentFraction);
    }
예제 #4
0
 public BattelPersonPlayer(IFractionsData fractions, ICollectionCardsData collection, ICardFactory <IAttackCard> cardFactory)
     : base(fractions, collection, cardFactory)
 {
     TypePerson = TypePersonEnum.player;
 }
예제 #5
0
 public void InjectMetod(ICardFactory <ICard> cardFactory, ICollectionCardsData collection, IFractionsData fractions,
                         FractionsMenu fractionMenu, CollectionMenu menu)
 {
     (this.cardFactory, this.collection, this.fractions, this.fractionMenu, this.menu)
         = (cardFactory, collection, fractions, fractionMenu, menu);
 }
예제 #6
0
 public CollectionCardsData(IFractionsData fractions)
 {
     Cards = LoadCollectionCard(fractions);
     (cardsInitiative = Cards.Values.ToList()).Sort(CompareTo);
 }
예제 #7
0
 public void InjectMetod(IDeckFactory deckFactory, IFractionsData fractions, CollectionMenu menu,
                         IUserData userDecks, IDeckEditorPanel editorDeck, FractionsMenu fractionMenu) =>
 (this.deckFactory, this.fractions, this.menu, this.userDecks, this.editorDeck, this.fractionMenu)
예제 #8
0
 public void Initialize(ICardFactory <ICard> cardFactory, ICollectionCardsData collection,
                        IFractionsData fractions, IUserData userDecks, FractionsMenu fractionMenu, ReturnButton returnButton) =>
 (this.cardFactory, this.collection, this.fractions, this.userDecks, this.fractionMenu, this.returnButton)
예제 #9
0
 public void Build(ICardFactory <ICard> cardFactory, ICollectionCardsData collection, Action <ICard> clickCard, IFractionsData fractions)
 {
     this.fractions = fractions;
     base.Build(cardFactory, collection, clickCard);
 }