Пример #1
0
 public static void SBEq(ref BulletManager.SimpleBullet sb1, ref BulletManager.SimpleBullet sb2, string msg)
 {
     VecEq(sb1.direction, sb2.direction, $"{msg} Direction");
     Assert.AreEqual(sb1.scale, sb2.scale, err, $"{msg} Scale");
     Assert.AreEqual(sb1.grazeFrameCounter, sb2.grazeFrameCounter, $"{msg} GrazeCtr");
     Assert.AreEqual(sb1.cullFrameCounter, sb2.cullFrameCounter, err, $"{msg} CullCtr");
     BPIEq(sb1.bpi, sb2.bpi, msg);
 }
Пример #2
0
 public static void PoolEq(BulletManager.AbsSimpleBulletCollection sbc1,
                           BulletManager.AbsSimpleBulletCollection sbc2)
 {
     if (sbc1.Count != sbc2.Count)
     {
         Assert.Fail($"Different counts: {sbc1.Count} {sbc2.Count}");
     }
     for (int ii = 0; ii < sbc1.Count; ++ii)
     {
         ref BulletManager.SimpleBullet sb1 = ref sbc1[ii];
         ref BulletManager.SimpleBullet sb2 = ref sbc2[ii];
Пример #3
0
 public static void SBPos(ref BulletManager.SimpleBullet sb, V2RV2 loc, string msg = "") =>
 VecEq(loc.TrueLocation, sb.bpi.loc, msg);
Пример #4
0
 public static void SBPos(ref BulletManager.SimpleBullet sb, Vector2 loc, string msg = "") =>
 VecEq(loc, sb.bpi.loc, msg);