Example #1
0
    public void Shout(string text)
    {
        Vector3 newPos = new Vector3(500, 460, 0);

        Shout newShout = Instantiate(shoutPrefab, newPos, new Quaternion());

        newShout.GetComponentInChildren <Text>().text = text;
        newShout.transform.SetParent(this.transform);
    }
Example #2
0
    public void Shout(int playerId, string text)
    {
        Vector3 newPos = new Vector3(512, 230, 0);

        if (playerId == 1)
        {
            newPos = new Vector3(720, 230, 0);
        }
        else if (playerId == 0 && playerNum > 1)
        {
            newPos = new Vector3(250, 230, 0);
        }

        Shout newShout = Instantiate(shoutPrefab, newPos, new Quaternion());

        newShout.GetComponentInChildren <Text>().text = text;
        newShout.transform.SetParent(this.transform);
    }