Ejemplo n.º 1
0
    public LetterDisplay SpawnLetter()
    {
        Vector2       vector        = new Vector2(Random.Range(-1.4f, 1.4f), Random.Range(-4f, 1.8f));
        GameObject    letterObject  = Instantiate(LetterPrefub, vector, Quaternion.identity);
        LetterDisplay letterDisplay = letterObject.GetComponentInChildren <LetterDisplay>();

        letterObject.GetComponent <Rigidbody2D>().velocity = new Vector2(Random.Range(-1.5f, 1.5f), Random.Range(-1.5f, 1.5f));
        return(letterDisplay);
    }
Ejemplo n.º 2
0
 public Letter(string _letter, LetterDisplay _display)
 {
     letter  = _letter;
     display = _display;
     display.SetLetter(letter);
 }