/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { game = this; _activeCues = new List<Cue>(); // TODO: Add your initialization logic here im_title = Content.Load<Texture2D>( "art/title" ); im_door = Content.Load<Texture2D>( "art/door" ); im_stage = Content.Load<Texture2D>( "art/stage" ); im_skybox = Content.Load<Texture2D>( "art/skybox" ); im_demon = Content.Load<Texture2D>( "art/demon" ); im_gameover = Content.Load<Texture2D>("art/gameover"); im_cop = Content.Load<Texture2D>("art/police_01"); im_windowbreak = Content.Load<Texture2D>( "art/window_break" ); im_bullet = Content.Load<Texture2D>("art/bullet"); im_arrow = Content.Load<Texture2D>("art/arrow"); graphics.PreferredBackBufferWidth = 640; graphics.PreferredBackBufferHeight = 480; graphics.IsFullScreen = true; _engine = new AudioEngine("Content/music.xgs"); _sb = new SoundBank(_engine, "Content/Sound Bank.xsb"); _wb = new WaveBank(_engine, "Content/Wave Bank.xwb"); List<Texture2D> tmpLst = new List<Texture2D>(); for( int i = 1; i < 10; i++ ) { tmpLst.Add( Content.Load<Texture2D>("art/cloud_0"+i) ); } im_clouds = tmpLst.ToArray(); tmpLst = new List<Texture2D>(); for( int i = 1; i < 8; i++ ) { tmpLst.Add( Content.Load<Texture2D>( "art/civilian_0" + i ) ); } im_civvies = tmpLst.ToArray(); im_car1 = Content.Load<Texture2D>( "art/car_01" ); im_car2 = Content.Load<Texture2D>( "art/car_02" ); ft_hud24 = Content.Load<SpriteFont>( "HUD24" ); LoadLevel("blurb"); //LoadLevel("title"); base.Initialize(); }