예제 #1
0
        /// <summary>
        /// Adds a new system FsmEvent to the blackboard.
        /// <param name="name">The new system event name.</param>
        /// <param name="id">The new system event id.</param>
        /// <returns>The new system event.</returns>
        /// </summary>
        FsmEvent AddSystemEvent(string name, int id)
        {
            // Creates the variable
            var fsmEvent = new ConcreteFsmEvent(name, this, id, true);
            // Create the list
            var fsmEventList = new List <ConcreteFsmEvent>(m_ConcreteFsmEvents);

            // Add variable to the list
            fsmEventList.Add(fsmEvent);
            // Create a new array
            m_ConcreteFsmEvents = fsmEventList.ToArray();
            // Return the new variable
            return(fsmEvent);
        }
예제 #2
0
 /// <summary>
 /// Adds a new FsmEvent to the blackboard.
 /// <returns>The new fsmEvent.</returns>
 /// </summary> 
 public FsmEvent AddFsmEvent () {
     // Get a new id
     var newId = GetUniqueID();
     // Creates the variable
     var fsmEvent = new ConcreteFsmEvent("New FsmEvent", this, newId, false);
     // Create the list
     var fsmEventList = new List<ConcreteFsmEvent>(m_ConcreteFsmEvents);
     // Add variable to the list
     fsmEventList.Add(fsmEvent);
     // Create a new array
     m_ConcreteFsmEvents = fsmEventList.ToArray();
     // Return the new variable
     return fsmEvent;
 }
 /// <summary>
 /// Adds a new system FsmEvent to the blackboard.
 /// <param name="name">The new system event name.</param>
 /// <param name="id">The new system event id.</param>
 /// <returns>The new system event.</returns>
 /// </summary>
 FsmEvent AddSystemEvent (string name, int id) {
     // Creates the variable
     var fsmEvent = new ConcreteFsmEvent(name, this, id, true);
     // Create the list
     var fsmEventList = new List<ConcreteFsmEvent>(m_ConcreteFsmEvents);
     // Add variable to the list
     fsmEventList.Add(fsmEvent);
     // Create a new array
     m_ConcreteFsmEvents = fsmEventList.ToArray();
     // Return the new variable
     return fsmEvent;
 }