/// <summary> /// Create an MmMessage, with control block, MmMethod, and a string /// </summary> /// <param name="initVal">String payload</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageString(string initVal, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, metadataBlock) { value = initVal; }
/// <summary> /// Create an MmMessage, with control block, MmMethod, and an int /// </summary> /// <param name="iVal">Int payload</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageInt(int iVal, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, MmMessageType.MmInt, metadataBlock) { value = iVal; }
/// <summary> /// Create an MmMessage, with control block, MmMethod, and float /// </summary> /// <param name="iVal">Float payload</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageFloat(float iVal, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, metadataBlock) { value = iVal; }
/// <summary> /// Invoke an MmMethod with no parameter. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, MmMetadataBlock metadataBlock = null) { MmMessage msg = new MmMessage(mmMethod, metadataBlock); MmInvoke(MmMessageType.MmVoid, msg); }
/// <summary> /// Create an MmMessage, with control block, MmMethod, and a Vector4 /// </summary> /// <param name="iVal">Vector4 payload</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageVector4(Vector4 iVal, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, metadataBlock) { value = iVal; }
/// <summary> /// Create an MmMessage, with control block, MmMethod, and byte array /// </summary> /// <param name="iVal">Byte array payload</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageByteArray(byte[] iVal, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, metadataBlock) { byteArr = iVal; }
/// <summary> /// Create an MmMessage, with control block, MmMethod, and an MmTransform /// </summary> /// <param name="transform">MmTransform payload</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageTransform(MmTransform transform, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, MmMessageType.MmTransform, metadataBlock) { MmTransform = transform; }
/// <summary> /// Create an MmMessage, with control block, MmMethod, and an GameObject /// </summary> /// <param name="transform">MmTransform payload</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageGameObject(GameObject gameObject, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, metadataBlock) { Value = gameObject; }
/// <summary> /// Create an MmMessage, with control block, MmMethod, and a /// list of MmTransforms /// </summary> /// <param name="iTransforms">List of transforms to send in payload</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageTransformList(List <MmTransform> iTransforms, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, MmMessageType.MmTransformList, metadataBlock) { transforms = iTransforms; }
/// <summary> /// Create an MmMessage, with defined control block, MmMethod, and boolean value /// </summary> /// <param name="iVal">Boolean value</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageBool(bool iVal, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, MmMessageType.MmBool, metadataBlock) { value = iVal; }
/// <summary> /// Create an MmMessage, with control block, MmMethod, and a Vector3 /// </summary> /// <param name="iVal">Vector3 payload</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageVector3(Vector3 iVal, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, MmMessageType.MmVector3, metadataBlock) { value = iVal; }
/// <summary> /// Create an MmMessage, with control block, MmMethod, and an int /// </summary> /// <param name="iVal">Serializable Payload</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageSerializable(IMmSerializable iVal, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, MmMessageType.MmSerializable, metadataBlock) { value = iVal; }
/// Invoke an MmMethod with parameter: GameObject. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="param">MmMethod parameter: GameObject. <see cref="MmMessage"/> </param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, GameObject param, MmMetadataBlock metadataBlock = null) { MmMessage msg = new MmMessageGameObject(param, mmMethod, metadataBlock); MmInvoke(msg); }
/// <summary> /// Invoke an MmMethod with parameter: MmTransform. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="param">MmMethod parameter: MmTransform. <see cref="MmTransform"/></param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, MmTransform param, MmMetadataBlock metadataBlock = null) { MmMessage msg = new MmMessageTransform(param, mmMethod, metadataBlock); MmInvoke(msg); }
/// <summary> /// Invoke an MmMethod with parameter: float. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="param">MmMethod parameter: float.</param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, float param, MmMetadataBlock metadataBlock = null) { MmMessage msg = new MmMessageFloat(param, mmMethod, metadataBlock); MmInvoke(MmMessageType.MmFloat, msg); }
/// <summary> /// Invoke an MmMethod with parameter: IMmSerializable. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="param">MmMethod parameter: IMmSerializable. <see cref="IMmSerializable"/> </param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, IMmSerializable param, MmMetadataBlock metadataBlock = null) { MmMessage msg = new MmMessageSerializable(param, mmMethod, metadataBlock); MmInvoke(MmMessageType.MmSerializable, msg); }
/// <summary> /// Copy Constructor for MmMetadataBlock /// </summary> /// <param name="original">MmMetadataBlock to be copied.</param> public MmMetadataBlock(MmMetadataBlock original) { LevelFilter = original.LevelFilter; ActiveFilter = original.ActiveFilter; SelectedFilter = original.SelectedFilter; NetworkFilter = original.NetworkFilter; Tag = original.Tag; }
/// <summary> /// Invoke an MmMethod with parameter: byte array. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="param">MmMethod parameter: byte array.</param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, byte[] param, MmMetadataBlock metadataBlock = null) { MmMessage msg = new MmMessageByteArray(param, mmMethod, metadataBlock); MmInvoke(MmMessageType.MmByteArray, msg); }
/// <summary> /// Invoke an MmMethod with parameter: List<MmTransform>. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="param">MmMethod parameter: List<MmTransform>.</param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, List <MmTransform> param, MmMetadataBlock metadataBlock = null) { MmMessage msg = new MmMessageTransformList(param, mmMethod, metadataBlock); MmInvoke(MmMessageType.MmTransformList, msg); }
/// <summary> /// Invoke an MmMethod with parameter: string. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="param">MmMethod parameter: string.</param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, string param, MmMetadataBlock metadataBlock = null) { MmMessage msg = new MmMessageString(param, mmMethod, metadataBlock); MmInvoke(MmMessageType.MmString, msg); }
/// <summary> /// Invoke an MmMethod with parameter: Vector4. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="param">MmMethod parameter: Vector4.</param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, Vector4 param, MmMetadataBlock metadataBlock = null) { MmMessage msg = new MmMessageVector4(param, mmMethod, metadataBlock); MmInvoke(MmMessageType.MmVector4, msg); }
/// <summary> /// Invoke an MmMethod with parameter: bool. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="param">MmMethod parameter: bool.</param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, bool param, MmMetadataBlock metadataBlock = null) { MmMessage msg = new MmMessageBool(param, mmMethod, metadataBlock); MmInvoke(MmMessageType.MmBool, msg); }
/// <summary> /// Create an MmMessage, with control block, MmMethod, and an MmTransform /// </summary> /// <param name="transform">MmTransform payload</param> /// <param name="globalTransform">Should message recipient apply to global or local transform?</param> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageTransform(MmTransform transform, bool localTransform, MmMethod mmMethod = default(MmMethod), MmMetadataBlock metadataBlock = null) : base(mmMethod, metadataBlock) { MmTransform = transform; LocalTransform = localTransform; }
/// Invoke a general MmMethod with parameter: MmMessage. /// </summary> /// <param name="mmMethod">MmMethod Identifier - <see cref="MmMethod"/></param> /// <param name="param">MmMethod parameter: MmMessage. <see cref="MmMessage"/> </param> /// <param name="metadataBlock">Object defining the routing of /// Mmessages through MercuryMessaging Hierarchies. <see cref="MmMetadataBlock"/></param> public virtual void MmInvoke(MmMethod mmMethod, MmMessage param, MmMessageType msgType, MmMetadataBlock metadataBlock = null) { MmMessage msg = param.Copy(); msg.MmMethod = mmMethod; msg.MetadataBlock = metadataBlock; MmInvoke(msg); }
/// <summary> /// Create an MmMessage, with filters defined directly /// </summary> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="levelFilter">Determines direction of messages</param> /// <param name="activeFilter">Determines whether message sent to active and/or inactive objects</param> /// <param name="selectedFilter">Determines whether message sent to objects "selected" as defined by MmRelayNode implementation</param> /// <param name="networkFilter">Determines whether message will remain local or can be sent over the network</param> public MmMessage(MmMethod mmMethod, MmLevelFilter levelFilter, MmActiveFilter activeFilter, MmSelectedFilter selectedFilter, MmNetworkFilter networkFilter) { MmMethod = mmMethod; MetadataBlock = new MmMetadataBlock(); MetadataBlock.LevelFilter = levelFilter; MetadataBlock.ActiveFilter = activeFilter; MetadataBlock.SelectedFilter = selectedFilter; MetadataBlock.NetworkFilter = networkFilter; }
/// <summary> /// Create an MmMessage, with defined control block and MmMethod /// </summary> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="metadataBlock">Object defining the routing of messages through MercuryMessaging Hierarchys.</param> public MmMessage(MmMethod mmMethod, MmMetadataBlock metadataBlock = null) { MmMethod = mmMethod; if (metadataBlock != null) { MetadataBlock = new MmMetadataBlock(metadataBlock); } else { MetadataBlock = new MmMetadataBlock(); } }
/// <summary> /// Create an MmMessage, with defined control block and MmMethod /// </summary> /// <param name="mmMethod">Identifier of target MmMethod</param> /// <param name="msgType">Type of Mercury Message.</param> /// <param name="metadataBlock">Object defining the routing of messages through MercuryMessaging Hierarchys.</param> public MmMessage(MmMethod mmMethod, MmMessageType msgType = default(MmMessageType), MmMetadataBlock metadataBlock = null) { MmMethod = mmMethod; MmMessageType = msgType; if (metadataBlock != null) { MetadataBlock = new MmMetadataBlock(metadataBlock); } else { MetadataBlock = new MmMetadataBlock(); } }
/// <summary> /// Creates a basic MmMessageVector4, with a control block /// </summary> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageVector4(MmMetadataBlock metadataBlock = null) : base(metadataBlock) { }
/// <summary> /// Creates a basic MmMessageGameObject, with a control block /// </summary> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageGameObject(MmMetadataBlock metadataBlock = null) : base(metadataBlock) { }
/// <summary> /// Creates a basic MmMessageTransformList, /// with a control block /// </summary> /// <param name="metadataBlock">Object defining the routing of messages</param> public MmMessageTransformList(MmMetadataBlock metadataBlock = null) : base(metadataBlock, MmMessageType.MmTransformList) { transforms = new List <MmTransform>(); }