public AllBackground(ContentManager content, Plane player) { Backgrounds = new List<Scrolling>(); this.Content = content; playerSpeed = player.speed; AddAll(); }
protected override void Initialize() { font = Content.Load<SpriteFont>("gamefont"); SCORE = new Score(); Menu = new MainMenu(); Menu.Init(this.Content, SCORE); player = new Plane(); enemies = new List<Enemy>(); explosions = new List<Animations>(); tree = new List<tree>(); random = new Random(); this.rotationPlane = -0.3f; previousSpawnTime = TimeSpan.Zero; enemySpawnTime = TimeSpan.FromSeconds(3.0f); previousTreeSpawnTime = TimeSpan.Zero; treeSpawnTime = TimeSpan.FromSeconds(2.0f); score = 0; Score = 0; CurrentGameState = GameState.MainMenu; CurrentController = GameController.Arrow; IsMouseVisible = true; // RADIO Radio = new _RadioControl(); if (Radio.CheckPorts().Length != 0) { Radio.CreatPort(Radio.CheckPorts()[0]); Thread oThread = new Thread(new ThreadStart(Radio.ListeningSignal)); oThread.Start(); Radio.SetMin(); } this.Go = false; base.Initialize(); }