Exemple #1
0
 public void Awake()
 {
     TestCommand = IntProp.Select(x => x > 0).ToReactiveCommand <int>();
     TestCommand.Subscribe(val =>
     {
         Debug.unityLogger.Log($"val = {val} IntProp.Value = {IntProp.Value}");
         IntProp.Value -= 1;
     });
     ChangeColor = Flagger.ToMVVMReactiveCommand();
     ChangeColor.Subscribe(_ => Color.Value = Random.ColorHSV());
 }
 private int[] CollectInt(IntProp prop, ArrayList result)
 {
     foreach (TerminalParam param in _history)
     {
         int t = prop(param);
         if (t > 0 && !result.Contains(t))
         {
             result.Add(t);
         }
     }
     return((int[])result.ToArray(typeof(int)));
 }
Exemple #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + IntProp.GetHashCode();
         hash = hash * 23 + StringProp.GetHashCode();
         hash = hash * 23 + BoolField.GetHashCode();
         hash = hash * 23 + ListOfString.GetHashCode();
         foreach (var s in ListOfString)
         {
             hash = hash * 23 + s.GetHashCode();
         }
         return(hash);
     }
 }
 private int[] CollectInt(IntProp prop, ArrayList result)
 {
     foreach(TerminalParam param in _history) {
         int t  = prop(param);
         if(t>0 && !result.Contains(t)) result.Add(t);
     }
     return (int[])result.ToArray(typeof(int));
 }
 public override int GetHashCode()
 {
     return((StrProp + StrProp1 + IntProp.ToString()).GetHashCode());
 }
 public override int GetHashCode()
 {
     return((StrField + StrProp + IntProp.ToString() + IntField.ToString()).GetHashCode());
 }
Exemple #7
0
 /** <inheritdoc /> */
 public override int GetHashCode()
 {
     // ReSharper disable once NonReadonlyMemberInGetHashCode
     return(IntProp.GetHashCode());
 }
Exemple #8
0
 /** <inheritdoc /> */
 public override string ToString()
 {
     return(IntProp.ToString());
 }
Exemple #9
0
 /** <inheritdoc /> */
 public override int GetHashCode()
 {
     return(IntProp.GetHashCode());
 }