예제 #1
0
        private void Start()
        {
#if !UNITY_EDITOR
            tryLoadDeckFromPrefs();
            if (_useDefaultDeck)
            {
                _deck = _defaultDeck.toIdArray();
            }
#else
            if (_testRandomDeck)
            {
                List <int> randomDeck = new List <int>();
                randomDeck.Add(Reimu.ID);
                System.Random random = new System.Random();
                for (int i = 0; i < 30; i++)
                {
                    randomDeck.Add(cards.GetCardDefines(c => cards.isStandardCard(c)).randomTake(random, 1).First().id);
                }
                _deck = randomDeck.ToArray();
            }
            if (_useDefaultDeck)
            {
                _deck = _defaultDeck.toIdArray();
            }
            if (_useTestDeck)
            {
                _deck = _testDeck.toIdArray();
            }
#endif
        }