/// <summary>
        /// Send a message back to the Deployment Controller that issued this InstructionSet
        /// </summary>
        /// <param name="message"></param>
        /// <returns>True if delivered</returns>
        public bool ReportMessage(Message message)
        {
            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            if (message is InstructionMessage)
            {
                InstructionMessage m = (InstructionMessage)message;

                m.DeploymentControllerID = DeploymentControllerID;
                m.InstructionSetID       = ID;
            }

            try
            {
                return(SurgeBranchManager.SendMessage(message, Connection, BranchManager));
            }
            catch (Exception ex)
            {
                STEM.Sys.EventLog.WriteEntry("_InstructionSet.Report", ex.ToString(), STEM.Sys.EventLog.EventLogEntryType.Error);
            }

            return(false);
        }
Beispiel #2
0
    void OnInstruction(NetworkMessage netMsg)
    {
        InstructionMessage msg = netMsg.ReadMessage <InstructionMessage>();

        Debug.Log("InstructionMessage " + msg.instruction);

        // if instruction is enter, select object being gazed

        if (msg.instruction == "enter")
        {
            GazeManager.Instance.FocusedObject.GetComponent <TapToPlace>().OnSelect();
        }
    }
Beispiel #3
0
    void OnInstruction(NetworkMessage netMsg)
    {
        InstructionMessage msg = netMsg.ReadMessage <InstructionMessage>();

        Debug.Log("InstructionMessage " + msg.instruction);
    }
Beispiel #4
0
 private void Awake()
 {
     instructionMessage = FindObjectOfType <InstructionMessage>();
 }
Beispiel #5
0
 /// <summary>
 /// InstructionSets executing on a Branch may choose to send Messages back to the DeploymentController that generated the InstructionSet;
 /// these Messages are delivered to the DeploymentController through InstructionMessageReceived
 /// </summary>
 /// <param name="m">The message related to an Instruction</param>
 /// <param name="d">The DeploymentDetails instance related to the InstructionSet that generated the Message</param>
 public virtual void InstructionMessageReceived(InstructionMessage m, DeploymentDetails d)
 {
 }