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); }
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];
public static void SBPos(ref BulletManager.SimpleBullet sb, V2RV2 loc, string msg = "") => VecEq(loc.TrueLocation, sb.bpi.loc, msg);
public static void SBPos(ref BulletManager.SimpleBullet sb, Vector2 loc, string msg = "") => VecEq(loc, sb.bpi.loc, msg);