Ejemplo n.º 1
0
    public baseWordAlphaTypingMonster(string word, AlphaTypingMonsterSpawner spawner, Vector3 originalPosition, Vector3 normalizeDirection, int isRight)
    {
        this._word = word;
        typeIndex  = 0;

        wordBox = spawner.SpawnWord(originalPosition, normalizeDirection, isRight);
        wordBox.SetWord(word);
        wordBox.setMoveDirection(spawner.GetIsRight());
        wordBox.SetNormalizeDirection(spawner.GetNormalizeDirection());
    }
Ejemplo n.º 2
0
    public AlphaTypingMonsterBox SpawnWord(Vector3 originalPosition, Vector3 normalizeDirection, int isRight)
    {
        GameObject wordObj = Instantiate(wordPrefab, originalPosition, Quaternion.identity, rectCanvas);

        this.isRight            = isRight != 0;
        this.normalizeDirection = normalizeDirection;

        AlphaTypingMonsterBox wordDisplay = wordObj.GetComponent <AlphaTypingMonsterBox>();

        return(wordDisplay);
    }