Exemplo n.º 1
0
    protected virtual void InitializeWordParams(GameObject wordObj)
    {
        Word wordSpawned = wordObj.GetComponent <Word>();

        switch (StaticData.WordData.SpawningType)
        {
        case WordSpawningType.RandomLetters:
            wordSpawned.InitializeWordSetup(wordStartPos.position, wordEndPos.position);
            break;

        case WordSpawningType.RandomWords:
            wordSpawned.InitializeWordSetup(wordStartPos.position, wordEndPos.position);
            break;

        case WordSpawningType.StringArray:
            wordSpawned.InitializeWordSetup(wordStartPos.position, wordEndPos.position);
            break;

        default:
            break;
        }

        wordSpawnInterval = WordHelper.CalculateNextWordSpawn(wordSpawned);
        //Debug.Log("Interval: " + wordSpawnInterval);
        queueHandler.AddWordToQueue(wordSpawned);
    }