public Game1() { player = new MonoGameSwordsPerson(this); this.Components.Add(player); songManager = new SongManager(this); this.Components.Add(songManager); skeleManager = new SkeletonManager(this, player); this.Components.Add(skeleManager); input = new PlayerController(this); this.Components.Add(input); score = new ScoreManager(this); this.Components.Add(score); IsFixedTimeStep = true; this.TargetElapsedTime = TimeSpan.FromSeconds(1d / framesPerSecond); this.Window.Title = TargetElapsedTime.ToString(); graphics = new GraphicsDeviceManager(this); graphics.PreferredBackBufferHeight = 800; graphics.PreferredBackBufferWidth = 800; Content.RootDirectory = "Content"; }
/// <summary> /// Constructor /// </summary> public Main() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; inputState = new InputState(); recorder = new Recorder(); Pad.Played += new EventHandler(Pad_Played); // Frame rate is 30 fps (=333333 ticks) by default for Windows Phone 7. However later // Windows Phone releases should support 60 fps, so we'll try that TargetElapsedTime = TimeSpan.FromTicks(166666); System.Diagnostics.Debug.WriteLine("Target elapsed time " + TargetElapsedTime.ToString()); }