Example #1
0
    public void Initialize()
    {
        // 合成防止の蓋として、DeckCardのタグを持つDeckCardを配置。
        GameObject    topDeck    = _cardGenerator.DeckCreate();
        RectTransform topdeckPos = topDeck.GetComponent <RectTransform>();

        topdeckPos.anchoredPosition = new Vector2(deckPos_x, deckPos_y);


        // DeckCardの下に、HandCardの束を配置。ひとまず、60枚のカードデックとする。
        for (int i = 0; i < 60; i++)
        {
            int a = Random.Range(0, 20);

            HandController firstDeck = _cardGenerator.Create(a);
            RectTransform  deckPos   = firstDeck.gameObject.GetComponent <RectTransform>();
            deckPos.anchoredPosition = new Vector2(deckPos_x, deckPos_y);
            _handList.Add(firstDeck);
        }

        _handDirector.Initialize();
    }