public static void GameOver(int score, int orbsCollected, float time, int continuesViaVideo, int continuesViaOrb, NextScreen nextScreen, bool watchedReplay, bool watchedVideoDoubleOrbs)
	{
		Dictionary<string, object> eventData = new Dictionary<string, object>();
		eventData.Add("score", score);
		eventData.Add("orbs", orbsCollected);
		eventData.Add("time", time);
		eventData.Add("continuesViaVideo", continuesViaVideo);
		eventData.Add("continuesViaOrbs", continuesViaOrb);
		eventData.Add("nextScreen", nextScreen.ToString());
		eventData.Add("watchedReplay", watchedReplay);
		eventData.Add("watchedVideoDoubleOrbs", watchedVideoDoubleOrbs);
		eventData.Add("gamesPlayed", 1);

		SendData(CustomEvent.GameOver, eventData);
	}
示例#2
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;

            ScreenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);

            Content.RootDirectory = "Content";

            Components.Add(new InputHandler(this));

            stateManager = new GameStateManager(this);
            Components.Add(stateManager);

            TitleScreen = new TitleScreen(this, stateManager);

            NextScreen = new NextScreen(this, stateManager);

            GameScreen = new GameScreen(this, stateManager);

            stateManager.ChangeState(TitleScreen);
        }
示例#3
0
 public void MoveNextScreen()
 {
     NextScreen.ProcessCommands("");
 }
示例#4
0
        public static bool Draw()
        {
            if (NextScreen != null && _Fading == null)
            {
                _Fading = new CFading(0f, 1f, CConfig.Config.Graphics.FadeTime);

                if (NextScreen.PartyModeID != -1)
                {
                    CFonts.PartyModeID = NextScreen.PartyModeID;
                    NextScreen.OnShow();
                    CFonts.PartyModeID = -1;
                }
                else
                {
                    NextScreen.OnShow();
                }
                if (_Cursor.IsActive)
                {
                    NextScreen.ProcessMouseMove(_Cursor.X, _Cursor.Y);
                }

                HidePopup(EPopupScreens.PopupPlayerControl);
                if (NextScreen.CurrentMusicType != EMusicType.Background && NextScreen.CurrentMusicType != EMusicType.Preview && NextScreen.CurrentMusicType != EMusicType.BackgroundPreview)
                {
                    CBackgroundMusic.Disabled = true;
                }
            }

            if (_Fading != null)
            {
                Debug.Assert(NextScreen != null);
                bool  finished;
                float newAlpha = _Fading.GetValue(out finished);

                if (!finished)
                {
                    ZOffset = CSettings.ZFar / 2;
                    _DrawScreen(CurrentScreen);

                    GlobalAlpha = newAlpha;
                    ZOffset     = 0f;
                    _DrawScreen(NextScreen);

                    GlobalAlpha = 1f;
                    int oldVol = CConfig.GetVolumeByType(CurrentScreen.CurrentMusicType);
                    int newVol = CConfig.GetVolumeByType(NextScreen.CurrentMusicType);
                    CSound.SetGlobalVolume((int)((newVol - oldVol) * newAlpha + oldVol));
                }
                else
                {
                    _FinishScreenFading();
                    if (_Cursor.IsActive)
                    {
                        CurrentScreen.ProcessMouseMove(_Cursor.X, _Cursor.Y);
                    }

                    _DrawScreen(CurrentScreen);
                }
            }
            else
            {
                _DrawScreen(CurrentScreen);
            }

            foreach (IMenu popup in _PopupScreens)
            {
                popup.Draw();
            }

            _Cursor.Draw();
            _DrawDebugInfos();

            return(true);
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="visit"> the visit</param>
 /// <param name="nextScreen">next screen</param>
 public NewVisitStoreEventArgs(VisitData visit, NextScreen nextScreen)
 {
     this.visit = visit;
     this.nextScreen = nextScreen;
 }
        private void doStoreVisit(NextScreen nextScreen)
        {
            long visitID = 0;
            if (visit != null){
                visitID = visit.Id;
            }

            NewVisitStoreEventArgs e2 = new NewVisitStoreEventArgs(
                new VisitData(visitID,textBoxCauseOfVisit.Text, textBoxStatusLocalis.Text, textBoxDiagnosis.Text,
                textBoxProcedure.Text,textBoxTherapy.Text,this.currentPatient.Id,DateTime.Now,
                textBoxAnesthesiology.Text, textBoxUltrasound.Text, textBoxBlooddiagnostic.Text,
                textBoxTodo.Text, textBoxRadiodiagnostics.Text), nextScreen);
            Store(this, e2);
            Clear();
        }