C# (CSharp) SparrowSharp.Utils Namespace

Classes

Name Description
Juggler The Juggler takes objects that implement IAnimatable (e.g. 'MovieClip's) and executes them. A juggler is a simple object. It does no more than saving a list of objects implementing 'Animatable' and advancing their time if it is told to do so (by calling its own 'AdvanceTime' method). Furthermore, an object can request to be removed from the juggler by dispatching an 'RemoveFromJuggler' event. There is a default juggler that you can access from anywhere with the following code: Juggler juggler = SparrowSharpApp.DefaultJuggler; You can, however, create juggler objects yourself, too. That way, you can group your game into logical components that handle their animations independently. A cool feature of the juggler is to delay method calls. Say you want to remove an object from its parent 2 seconds from now. Call: juggler.DelayInvocationAtTarget(object.RemoveFromParent, 2.0f); This line of code will execute the following method 2 seconds in the future: object.RemoveFromParent(); Alternatively, you can use the block-based verson of the method: juggler.DelayInvocationByTime(delegate{ object.RemoveFromParent(); }, 2.0f);
StatsDisplay The statistics display is used internally by Sparrow to display statistical information. Use the 'ShowStats()' method of 'ViewController' to show it. _This is an internal class. You do not have to use it manually._