Exemplo n.º 1
0
 /// <summary>
 /// Allows sending a generic command (as integer ID) and a trigger data packet without the
 /// need for the heavier-weight parameters of Activate. Use this when there isn't always a CogTriggerSource
 /// available. If there still needs to be a source reference of a different type you can specify it
 /// within the TriggerData packet.
 /// </summary>
 /// <param name="commandId">A generic command ID to be understood by the trigger target implementor</param>
 /// <param name="triggerData">Any data that needs to accompany the command</param>
 /// <returns>True if the command was accepted</returns>
 public virtual bool Command(int commandId, TriggerData triggerData)
 {
     return(false);
 }
Exemplo n.º 2
0
 public CogTriggerSource()
 {
     this.DataOnTrigger = new TriggerData();
 }
Exemplo n.º 3
0
        public CommonTargetAction DefaultActionOnLink;           // Which action we should take when dynamically linking a source to this target.

        /// <summary>
        /// Activates the trigger with the specified action.
        /// </summary>
        /// <returns>True if the activation was successful</returns>
        public abstract bool Activate(CogTriggerSource source, CommonTargetAction action, TriggerData triggerData);