public override void OnAdd(Component parent) { this.game = parent as PhantomGame; if (!(parent is PhantomGame)) { throw new Exception("Please add the Audio component to the PhantomGame."); } base.OnAdd(parent); }
public XnaPhantomComponent( PhantomGame phantom ) { this.phantom = phantom; }
public XnaPhantomComponent(PhantomGame phantom) { this.phantom = phantom; }
public static void Initialize(PhantomGame game) { game.AddComponent(new Audio()); }
public static void Initialize(PhantomGame game, int frequency) { Profiler.Instance = new Profiler(frequency); Profiler.RecordingThread = Thread.CurrentThread; game.InsertComponent(0, Profiler.Instance); }