public void Awake() { instance = this; decksData = new List <CardData>(); foreach (int cardNo in GameData.instance.deck) { decksData.Add(CardCreator.CreateCard(cardNo)); } }
public override void Execution() { CardData card = CardCreator.CreateCard(cardNo); if (card != null) { CardManager.instance.CardMove(card, CardPos.Hand); } }
public void StartPickUp() { c1 = CardCreator.GetRandomNormalCard(); c2 = CardCreator.GetRandomNormalCard(); c3 = CardCreator.GetRandomNormalCard(); cardView1.SetCard(CardCreator.CreateCard(c1)); cardView2.SetCard(CardCreator.CreateCard(c2)); cardView3.SetCard(CardCreator.CreateCard(c3)); }
// Start is called before the first frame update void Start() { int cardNum = 0; CardCreator cc = gameManager.GetComponent <CardCreator>(); for (int i = 1; i <= 12; i++) { GameObject newCard = cc.CreateCard(i, CardType.Default, new Vector3(transform.position.x, transform.position.y, transform.position.z - cardNum * stackOffset), transform.rotation); newCard.transform.parent = gameObject.transform; cards.Add(newCard); cardNum++; } for (int i = 0; i < 18; i++) { GameObject newCard = cc.CreateCard(0, CardType.Default, new Vector3(transform.position.x, transform.position.y, transform.position.z - cardNum * stackOffset), transform.rotation); newCard.transform.parent = gameObject.transform; cards.Add(newCard); cardNum++; } }
public void StartPrepare() { foreach (int cardNo in GameData.instance.deck) { CardManager.instance.deck.Add(CardCreator.CreateCard(cardNo)); } CardManager.instance.Shuffle(); handCardNum = GameData.instance.handCardNum; foreach (CharData chara in allChar) { charViewUIControl.OpenCharViewUI(chara.charView); } }
public override void Execution() { CardData card = CardCreator.CreateCard(cardNo); if (card != null) { if (top) { CardManager.instance.CardMove(card, CardPos.Deck, 1); } else { CardManager.instance.CardMove(card, CardPos.Deck); } } }
void Refresh() { int cardNo = CardCreator.GetRandomNormalCard(); card1.SetCard(CardCreator.CreateCard(cardNo)); int money = Random.Range(50, 80); price1 = money; buttonText1.text = price1.ToString() + "$"; cardNo = CardCreator.GetRandomNormalCard(); card2.SetCard(CardCreator.CreateCard(cardNo)); money = Random.Range(50, 80); price2 = money; buttonText2.text = price2.ToString() + "$"; cardNo = CardCreator.GetRandomNormalCard(); card3.SetCard(CardCreator.CreateCard(cardNo)); money = Random.Range(50, 80); price3 = money; buttonText3.text = price3.ToString() + "$"; UpdateGood(); }
private void SetUpImgToBaseCard(string _categoryKey, string _cardKey, Sprite sprite) { cardCreator.CreateCard(_cardKey, sprite); Signals.DeleteCardFromCategory.Invoke(categoryKey, _cardKey); }
public void AddCardToDeck(int cardNo) { GameData.instance.deck.Add(cardNo); decksData.Add(CardCreator.CreateCard(cardNo)); }
private Card GetRandomCard(AttackColorTypes type) { return(creator.CreateCard(type)); }