public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); NextQuestion = new BeefBall.Entities.Button(ContentManagerName, false); NextQuestion.Name = "NextQuestion"; NumberCorrect = new BeefBall.Entities.Button(ContentManagerName, false); NumberCorrect.Name = "NumberCorrect"; XButtoninst = new BeefBall.Entities.XButton(ContentManagerName, false); XButtoninst.Name = "XButtoninst"; YButtonInst = new BeefBall.Entities.YButton(ContentManagerName, false); YButtonInst.Name = "YButtonInst"; AButtonInst = new BeefBall.Entities.AButton(ContentManagerName, false); AButtonInst.Name = "AButtonInst"; BButtonInst = new BeefBall.Entities.BButton(ContentManagerName, false); BButtonInst.Name = "BButtonInst"; NextQuestion.Click += OnNextQuestionClick; NextQuestion.Click += OnNextQuestionClickTunnel; PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBallServices.IsLoaded<Scene>(@"content/screens/mainmenu/mybackground.scnx", ContentManagerName)) { } MyBackground = FlatRedBallServices.Load<Scene>(@"content/screens/mainmenu/mybackground.scnx", ContentManagerName); beep = FlatRedBallServices.Load<SoundEffect>(@"content/screens/mainmenu/beep", ContentManagerName); scene = MyBackground; StartGameButton = new BeefBall.Entities.Button(ContentManagerName, false); StartGameButton.Name = "StartGameButton"; AboutButton = new BeefBall.Entities.Button(ContentManagerName, false); AboutButton.Name = "AboutButton"; ExitButton = new BeefBall.Entities.Button(ContentManagerName, false); ExitButton.Name = "ExitButton"; StartGameButton.Click += OnStartButtonClick; StartGameButton.Click += OnStartButtonClickTunnel; AboutButton.Click += OnAboutButtonClick; AboutButton.Click += OnAboutButtonClickTunnel; ExitButton.Click += OnExitButtonClick; ExitButton.Click += OnExitButtonClickTunnel; StartGameButton.RollOn += OnStartButtonRollOn; StartGameButton.RollOn += OnStartButtonRollOnTunnel; StartGameButton.RollOff += OnStartButtonRollOff; StartGameButton.RollOff += OnStartButtonRollOffTunnel; AboutButton.RollOn += OnAboutButtonRollOn; AboutButton.RollOn += OnAboutButtonRollOnTunnel; AboutButton.RollOff += OnAboutButtonRollOff; AboutButton.RollOff += OnAboutButtonRollOffTunnel; ExitButton.RollOn += OnExitButtonRollOn; ExitButton.RollOn += OnExitButtonRollOnTunnel; ExitButton.RollOff += OnExitButtonRollOff; ExitButton.RollOff += OnExitButtonRollOffTunnel; PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }