Пример #1
0
    /// <summary>
    /// Removes active collision involving two specified entities or does nothing if
    /// no such collision exists.
    /// </summary>
    private static void RemoveCollision( Entity entity1, Entity entity2 )
    {
        Tuple<InstanceID, InstanceID> collision = GetCollision( entity1, entity2 );
        if( null != collision )
        {
            //-- Collision end events
            entity1.HandleCollisionEnd( entity2 );
            entity2.HandleCollisionEnd( entity1 );

            //-- Remove collision
            s_Collisions.Remove( collision );
        }
    }