public void Working_Test() { SCManagerProfiler.DoStartTestCase(nameof(Working_Test)); CList_Enter_Stay_Exit <int> list = new CList_Enter_Stay_Exit <int>(); int[] arrEmpty = new int[] { }; int[] arrValue = new int[] { 0, 1, 3, 5 }; list.AddEnter(arrValue); Assert.AreEqual(list.p_list_Enter.ToArray(), arrValue); Assert.AreEqual(list.p_list_Stay.ToArray(), arrValue); Assert.AreEqual(list.p_list_Exit.ToArray(), arrEmpty); arrValue = new int[] { 0 }; int[] arrExit = new int[] { 1, 3, 5 }; list.AddEnter(arrValue); Assert.AreEqual(list.p_list_Enter.ToArray(), arrEmpty); Assert.AreEqual(list.p_list_Stay.ToArray(), arrValue); Assert.AreEqual(list.p_list_Exit.ToArray(), arrExit); SCManagerProfiler.DoFinishTestCase(nameof(Working_Test)); SCManagerProfiler.DoPrintResult(true); }
// ========================================================================== // /* protected - Override & Unity API */ protected override void OnAwake() { base.OnAwake(); _arrColliderBuffer = new Collider[_iCapacity]; _arrColliderBuffer_2D = new Collider2D[_iCapacity]; _listVisibleObject = new CList_Enter_Stay_Exit <Collider2D>(); }