示例#1
0
 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);
 }
示例#2
0
 public XnaPhantomComponent( PhantomGame phantom )
 {
     this.phantom = phantom;
 }
 public XnaPhantomComponent(PhantomGame phantom)
 {
     this.phantom = phantom;
 }
示例#4
0
 public static void Initialize(PhantomGame game)
 {
     game.AddComponent(new Audio());
 }
示例#5
0
 public static void Initialize(PhantomGame game, int frequency)
 {
     Profiler.Instance        = new Profiler(frequency);
     Profiler.RecordingThread = Thread.CurrentThread;
     game.InsertComponent(0, Profiler.Instance);
 }