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); } }
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); }
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); }
public BattelPersonPlayer(IFractionsData fractions, ICollectionCardsData collection, ICardFactory <IAttackCard> cardFactory) : base(fractions, collection, cardFactory) { TypePerson = TypePersonEnum.player; }
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); }
public CollectionCardsData(IFractionsData fractions) { Cards = LoadCollectionCard(fractions); (cardsInitiative = Cards.Values.ToList()).Sort(CompareTo); }
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)
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)
public void Build(ICardFactory <ICard> cardFactory, ICollectionCardsData collection, Action <ICard> clickCard, IFractionsData fractions) { this.fractions = fractions; base.Build(cardFactory, collection, clickCard); }