コード例 #1
0
        ///<summary>
        /// Cleans up the pair handler.
        ///</summary>
        public override void CleanUp()
        {
            //Fire off some events if needed! Note the order; we should stop containing before we stop touching.
            if (Parent == null)
            {
                if (Containing)
                {
                    DetectorVolume.StoppedContaining(this);
                }
                if (Touching)
                {
                    DetectorVolume.StoppedTouching(this);
                }
            }
            Containing    = false;
            Touching      = false;
            WasContaining = false;
            WasTouching   = false;


            DetectorVolume.pairs.Remove(Collidable.entity);


            broadPhaseOverlap = new BroadPhaseOverlap();

            DetectorVolume = null;

            Parent = null;
            //Child cleanup is responsible for cleaning up direct references to the involved collidables.
        }
コード例 #2
0
        ///<summary>
        /// Cleans up the pair handler.
        ///</summary>
        public override void CleanUp()
        {
            //Fire off some events if needed! Note the order; we should stop containing before we stop touching. 
            if (Parent == null)
            {
                if (Containing)
                {
                    DetectorVolume.StoppedContaining(this);
                }
                if (Touching)
                {
                    DetectorVolume.StoppedTouching(this);
                }
            }
            Containing = false;
            Touching = false;
            WasContaining = false;
            WasTouching = false;


            DetectorVolume.pairs.Remove(Collidable.entity);


            broadPhaseOverlap = new BroadPhaseOverlap();

            DetectorVolume = null;

            Parent = null;
            //Child cleanup is responsible for cleaning up direct references to the involved collidables.


        }