Freezes clock so that relative time does not change

Namespace:  Equis.JanusToolkit
Assembly:  Janus (in Janus.dll)

Syntax

C#
public static void Freeze()

Remarks

This method is used at the start of the Draw method in an XNA game to freeze the time used by the Janus clock and ensure that all values retrieved from a TimeLine using the Get method are relative to the same time point. This method must always be used in conjunction with the UnFreeze method.

Examples

 Copy imageCopy Code
             protected override void Draw(GameTime gameTime)
                {
                    Janus.Freeze();
                    
                    // all the draw code goes in here
                    // between Freeze and UnFreeze
                    
                    Janus.UnFreeze();
                }
            

See Also