예제 #1
0
        public IRoad NextBranch(GameFlags flags)
        {
            var choise = Branch.Keys
                         .FirstOrDefault(a => a.ImplementTo(flags));

            return(choise != null ? Branch[choise] : Branch.Last().Value);
        }
예제 #2
0
 /// <summary>
 /// Are this object implement to other?
 /// Checking flags and last user`s choise
 /// </summary>
 /// <param name="other">Checked GameFlags</param>
 /// <returns>True if this implement to other</returns>
 public bool ImplementTo(GameFlags other)
 {
     return DialogChoice == other.DialogChoice && Flags.All(a => other.Flags.Contains(a));
 }
예제 #3
0
 /// <summary>
 /// Are this object implement to other?
 /// Checking flags and last user`s choise
 /// </summary>
 /// <param name="other">Checked GameFlags</param>
 /// <returns>True if this implement to other</returns>
 public bool ImplementTo(GameFlags other)
 {
     return(DialogChoice == other.DialogChoice && Flags.All(a => other.Flags.Contains(a)));
 }
예제 #4
0
 public IRoad NextBranch(GameFlags flags)
 {
     var choise = Branch.Keys
         .FirstOrDefault(a => a.ImplementTo(flags));
     return choise != null ? Branch[choise] : Branch.Last().Value;
 }