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); }
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); }
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); }
protected override void SendCompleteChanges(IEnumerable <INetworkConnection> connections) { previousText = this.textMesh.text; previousProperties = new TextMeshProperties(textMesh); SendDeltaChanges(connections, TextMeshProBroadcasterChangeType.FontAndPlacement | TextMeshProBroadcasterChangeType.Text); }
protected override void SendCompleteChanges(IEnumerable <SocketEndpoint> endpoints) { previousText = this.textMesh.text; previousProperties = new TextMeshProperties(textMesh); SendDeltaChanges(endpoints, TextMeshProBroadcasterChangeType.FontAndPlacement | TextMeshProBroadcasterChangeType.Text); }