コード例 #1
0
ファイル: AgentEvent.cs プロジェクト: ming81/TotalAI
 private bool AllAttendeesInState(AttendeeState attendeeState)
 {
     foreach (Attendee attendee in attendees)
     {
         if (attendee.state != attendeeState)
         {
             return(false);
         }
     }
     return(true);
 }
コード例 #2
0
ファイル: AgentEvent.cs プロジェクト: ming81/TotalAI
        public void SetAttendeeState(Agent agent, AttendeeState attendeeState)
        {
            foreach (Attendee attendee in attendees)
            {
                if (attendee.agent == agent)
                {
                    attendee.state = attendeeState;
                }
            }

            // See if all attendees are now ready to move event to next state
            if (CanMoveToNextState())
            {
                MoveToNextState();
            }
        }