コード例 #1
0
ファイル: ActionNotice.cs プロジェクト: zerowhale/monkey
 public ActionNotice(Object subject, NoticeVerb verb, INoticePredicate predicate)
     : base(subject, verb.ToString(), predicate == null ? null : new List <INoticePredicate>())
 {
     if (predicate != null)
     {
         Predicates.Add(predicate);
     }
 }
コード例 #2
0
ファイル: ActionNotice.cs プロジェクト: zerowhale/monkey
 public ActionNotice(Object subject, NoticeVerb verb, INoticePredicate[] predicates)
     : base(subject, verb.ToString(), predicates == null ? null : new List <INoticePredicate>())
 {
     if (predicates != null)
     {
         foreach (var predicate in predicates)
         {
             Predicates.Add(predicate);
         }
     }
 }
コード例 #3
0
 /// <summary>
 /// Packages a notice up and broadcasts it to all game players.
 /// </summary>
 /// <param name="obj">What or who the message is about.</param>
 /// <param name="verb">What action the object is taking.</param>
 /// <param name="predicates">Additional information about what happened.</param>
 public void Broadcast(Object obj, NoticeVerb verb, params INoticePredicate[] predicates)
 {
     Broadcast(new ActionNotice(obj, verb, predicates));
 }
コード例 #4
0
ファイル: ActionNotice.cs プロジェクト: zerowhale/monkey
 public ActionNotice(Object subject, NoticeVerb verb, List <INoticePredicate> predicates)
     : base(subject, verb.ToString(), predicates)
 {
 }
コード例 #5
0
ファイル: ActionNotice.cs プロジェクト: zerowhale/monkey
 public ActionNotice(Object subject, NoticeVerb verb)
     : base(subject, verb.ToString(), (INoticePredicate)null)
 {
 }