示例#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;
 }