public void AddNodeAttribute(String sourceId, ulong timeId, String nodeId, String attribute, Object value) { NetStreamStorage buff = new NetStreamStorage(). EncodeArray(_streamIdArray). EncodeEvent(NetStreamEvent.AddNodeAttr). EncodeString(sourceId). EncodeNative(timeId). EncodeString(nodeId). EncodeString(attribute). EncodeValueWithType(value); DoSend(buff); }
private static void AddNodeWithLabel(NetStreamSender stream, string sourceId, ref ulong timeId, string name) { if (lastNode != null) stream.RemoveNodeAttribute(sourceId, timeId++, lastNode, "ui.class"); stream.AddNode(sourceId, timeId++, name); stream.AddNodeAttribute(sourceId, timeId++, name, "ui.label", name); stream.AddNodeAttribute(sourceId, timeId++, name, "ui.class", "active"); lastNode = name; }