예제 #1
0
        protected override TextMeshProBroadcasterChangeType CalculateDeltaChanges()
        {
            TextMeshProBroadcasterChangeType change = TextMeshProBroadcasterChangeType.None;
            string newText = this.textMesh.text;

            if (previousText != newText)
            {
                change      |= TextMeshProBroadcasterChangeType.Text;
                previousText = newText;
            }
            if (!previousProperties.IsCached(textMesh))
            {
                change            |= TextMeshProBroadcasterChangeType.FontAndPlacement;
                previousProperties = new TextMeshProperties(textMesh);
            }

            return(change);
        }
예제 #2
0
        protected override byte CalculateDeltaChanges()
        {
            byte changeType = base.CalculateDeltaChanges();

            string             newText             = this.textMesh.text;
            TextMeshProperties newFontAndPlacement = new TextMeshProperties(this.textMesh);

            if (previousText != newText)
            {
                changeType  |= TextMeshChangeType.Text;
                previousText = newText;
            }
            if (previousFontAndPlacement != newFontAndPlacement)
            {
                changeType |= TextMeshChangeType.FontAndPlacement;
                previousFontAndPlacement = newFontAndPlacement;
            }

            return(changeType);
        }
예제 #3
0
            public override bool Equals(object obj)
            {
                if (!(obj is TextMeshProperties))
                {
                    return(false);
                }

                TextMeshProperties other = (TextMeshProperties)obj;

                return(other.alignment == alignment &&
                       other.anchor == anchor &&
                       other.characterSize == characterSize &&
                       other.color == color &&
                       other.fontSize == fontSize &&
                       other.fontStyle == fontStyle &&
                       other.lineSpacing == lineSpacing &&
                       other.offsetZ == offsetZ &&
                       other.richText == richText &&
                       other.tabSize == tabSize);
            }
예제 #4
0
 protected override void SendCompleteChanges(IEnumerable <INetworkConnection> connections)
 {
     previousText       = this.textMesh.text;
     previousProperties = new TextMeshProperties(textMesh);
     SendDeltaChanges(connections, TextMeshProBroadcasterChangeType.FontAndPlacement | TextMeshProBroadcasterChangeType.Text);
 }
예제 #5
0
 protected override void SendCompleteChanges(IEnumerable <SocketEndpoint> endpoints)
 {
     previousText       = this.textMesh.text;
     previousProperties = new TextMeshProperties(textMesh);
     SendDeltaChanges(endpoints, TextMeshProBroadcasterChangeType.FontAndPlacement | TextMeshProBroadcasterChangeType.Text);
 }