// Use this for initialization void Start() { cards = GameObject.Find("GameManager").GetComponent <Cards> (); buttonManager = GameObject.Find("GameManager").GetComponent <ButtonManager> (); cardCreater = GameObject.Find("GameManager").GetComponent <CardCreater> (); judgeText = GameObject.Find("Judge").GetComponent <Text>(); loseCount = 0; GameLogicSetting(); }
// Use this for initialization void Start() { gameLogic = GameObject.Find("GameManager").GetComponent <GameLogic> (); cardCreater = GameObject.Find("GameManager").GetComponent <CardCreater> (); CardsSetting(); for (int i = 0; i < MAX_CARD; i++) { playingCards [i].number = i % 13 + 1; playingCards[i].mark = i / 13; switch (playingCards [i].mark) { case 0: playingCards [i].cardImg = "c" + playingCards [i].number.ToString("00"); break; case 1: playingCards [i].cardImg = "d" + playingCards [i].number.ToString("00"); break; case 2: playingCards [i].cardImg = "h" + playingCards [i].number.ToString("00"); break; case 3: playingCards [i].cardImg = "s" + playingCards [i].number.ToString("00"); break; } if (playingCards [i].number > 10) { playingCards [i].number = 10; } } }