Example #1
0
    /// <summary>
    /// Updates a TextObject and overwrites its informations
    /// </summary>
    internal void UpdateText(BroadCastText broadcast)
    {
        GameObject  go       = GeometryStorage.Instance.GetGeometry(broadcast.textNr, GeometryStorage.GeoType.Txt);
        TextMeshPro textMesh = go.GetComponent <TextMeshPro>();

        textMesh.color                = GeoUtils.GetUColor(broadcast.color);
        go.transform.localPosition    = GeoUtils.GetVector(broadcast.position);
        go.transform.localEulerAngles = GeoUtils.GetVector(broadcast.rotation);
        textMesh.text     = broadcast.text;
        textMesh.fontSize = broadcast.textSize / 2;
    }
Example #2
0
 /// <summary>
 /// UpdateText is overwritten from its derived class: GeoClient,
 /// everytime geometry data is send, it is stacked in a special "list",
 /// which is later processed in the unity update circle
 /// </summary>
 /// <param name="data">The network class for Texts</param>
 protected override void UpdateText(BroadCastText data)
 {
     lock (geometryChanged)
         geometryChanged.Enqueue(data);
 }