예제 #1
0
    void Awake()
    {
        _nameInputManager = new NameInputManager(answer);
        _nameInputManager.ListenTo(_answerSlotPool);

        _slotFactory = new SlotFactory(tilePrefab, slotPrefab, _slotPool, _answerSlotPool);

        _answerSlotLayoutCreator = new AnswerSlotLayoutCreator(tileWidth, tilesPerRow, slotsY, _slotFactory);
        _tileLayoutCreator = new TileLayoutCreator(tileWidth, tilesPerRow, tilesY, _slotFactory);

        _answerSlotLayoutCreator.CreateAnswerSlotLayout(answer.Length);
        _tileLayoutCreator.CreateTileLayout(tiles);
    }
예제 #2
0
    void Awake()
    {
        if(TransitionData.CurrentLevel.answer != null)
        {
            answer = TransitionData.CurrentLevel.answer;
            image.texture = Resources.Load(TransitionData.CurrentLevel.image) as Texture;
        }

        _answerManager = new AnswerManager(answer, OnWon);
        _answerManager.ListenTo(_answerSlotPool);

        _slotFactory = new SlotFactory(tilePrefab, slotPrefab, _slotPool, _answerSlotPool);
        _tileLayoutCreator = new TileLayoutCreator(tileWidth, tilesPerRow, tilesY, _slotFactory);
        _answerSlotLayoutCreator = new AnswerSlotLayoutCreator(tileWidth, tilesPerRow, slotsY, _slotFactory);

        _tileLayoutCreator.CreateTileLayout(GenerateTileLettersFromAnswer());
        _answerSlotLayoutCreator.CreateAnswerSlotLayout(answer.Length);
    }