public CollisionHandler(Game1 game) { this.audioManager = game.audioManager; this.splashScreen = game.splashScreen; this.modelManager = game.modelManager; this.game = game; this.score = game.score; }
public ModelManager(Game1 game) : base(game) { this.game = game; this.splashScreen = game.splashScreen; this.score = game.score; rnd = new Random(); }
protected override void Initialize() { camera = new Camera(this, new Vector3(770, 1200, 1090), new Vector3(770, -2800, -500), Vector3.Up); Components.Add(camera); uiManager = new UIManager(this); audioManager = new AudioManager(this); score = new Score(); // Splash screen component splashScreen = new SplashScreen(this); Components.Add(splashScreen); splashScreen.SetData("Welcome to Battery Derby!", currentGameState); modelManager = new ModelManager(this); modelManager.Enabled = false; // for when splash screen is enabled modelManager.Visible = false; // for when splash screen is enabled Components.Add(modelManager); this.IsMouseVisible = true; /// read in our config and behaviour files, use our xml reader helper class XMLReader xmlRead = new XMLReader(this); base.Initialize(); }