Example #1
0
 public void RestartCurrentScene()
 {
     lock (this)
     {
         if (_Scene_ != null)
         {
             if ((_Scene_ is AGT.Forms.IAGT_SplashDialog) && (_Scene_.State == SceneState.INIT))
             {
                 if (_Scene_.ShowSplashScreen)
                 {
                     AGT.Forms.AGT_SplashDialog s1 = new AGT.Forms.AGT_SplashDialog(_VIDEO_DEVICE_,
                                                                                    (AGT.Forms.IAGT_SplashDialog)_Scene_);
                     s1.ShowDialog();
                     s1.Dispose();
                 }
             }
             if ((_Scene_ is AGT.Forms.IAGT_SceneLoadDialog) && (_Scene_.State == SceneState.INIT))
             {
                 if (!_Scene_.ShowSplashScreen)
                 {
                     AGT.Forms.AGT_SceneLoadDialog s2 = new AGT.Forms.AGT_SceneLoadDialog(_VIDEO_DEVICE_,
                                                                                          (AGT.Forms.IAGT_SceneLoadDialog)_Scene_);
                     s2.ShowDialog();
                     s2.Dispose();
                 }
             }
             _Scene_.State = SceneState.RENDER;
         }
     }
 }
Example #2
0
        public void GetNextScene(int index)
        {
            lock (this)
            {
                if ((_scene_queue.Count > 0) && (index < _scene_queue.Count))
                {
                    Suspend();

                    _Scene_ = _scene_queue[index];
                    if ((_Scene_ is AGT.Forms.IAGT_SplashDialog) && (_Scene_.State == SceneState.INIT))
                    {
                        if (_Scene_.ShowSplashScreen)
                        {
                            AGT.Forms.AGT_SplashDialog s1 = new AGT.Forms.AGT_SplashDialog(_VIDEO_DEVICE_,
                                                                                           (AGT.Forms.IAGT_SplashDialog)_Scene_);
                            s1.ShowDialog();
                            s1.Dispose();
                        }
                    }
                    if ((_Scene_ is AGT.Forms.IAGT_SceneLoadDialog) && (_Scene_.State == SceneState.INIT))
                    {
                        if (!_Scene_.ShowSplashScreen)
                        {
                            AGT.Forms.AGT_SceneLoadDialog s2 = new AGT.Forms.AGT_SceneLoadDialog(_VIDEO_DEVICE_,
                                                                                                 (AGT.Forms.IAGT_SceneLoadDialog)_Scene_);
                            s2.ShowDialog();
                            s2.Dispose();
                        }
                    }

                    Resume();
                }
                else
                {
                    if (OnGameOver == null)
                    {
                        MessageBox.Show("Generic placeholder.", "Game Over");
                        _Game_Over = true;
                    }
                    else
                    {
                        OnGameOver();
                    }
                }
            }
        }
Example #3
0
        public void GetNextScene(int index)
        {
            lock (this)
            {
                if ((_scene_queue.Count > 0) && (index < _scene_queue.Count))
                {
                    Suspend();

                    _Scene_ = _scene_queue[index];
                    if ((_Scene_ is AGT.Forms.IAGT_SplashDialog) && (_Scene_.State == SceneState.INIT))
                    {
                        if (_Scene_.ShowSplashScreen)
                        {
                            AGT.Forms.AGT_SplashDialog s1 = new AGT.Forms.AGT_SplashDialog(_VIDEO_DEVICE_,
                                (AGT.Forms.IAGT_SplashDialog)_Scene_);
                            s1.ShowDialog();
                            s1.Dispose();
                        }
                    }
                    if ((_Scene_ is AGT.Forms.IAGT_SceneLoadDialog) && (_Scene_.State == SceneState.INIT))
                    {
                        if (!_Scene_.ShowSplashScreen)
                        {
                            AGT.Forms.AGT_SceneLoadDialog s2 = new AGT.Forms.AGT_SceneLoadDialog(_VIDEO_DEVICE_,
                                (AGT.Forms.IAGT_SceneLoadDialog)_Scene_);
                            s2.ShowDialog();
                            s2.Dispose();
                        }
                    }

                    Resume();
                }
                else
                {
                    if (OnGameOver == null)
                    {
                        MessageBox.Show("Generic placeholder.", "Game Over");
                        _Game_Over = true;
                    }
                    else
                    {
                        OnGameOver();
                    }
                }
            }
        }
Example #4
0
 public void RestartCurrentScene()
 {
     lock (this)
     {
         if (_Scene_ != null)
         {
             if ((_Scene_ is AGT.Forms.IAGT_SplashDialog) && (_Scene_.State == SceneState.INIT))
             {
                 if (_Scene_.ShowSplashScreen)
                 {
                     AGT.Forms.AGT_SplashDialog s1 = new AGT.Forms.AGT_SplashDialog(_VIDEO_DEVICE_,
                         (AGT.Forms.IAGT_SplashDialog)_Scene_);
                     s1.ShowDialog();
                     s1.Dispose();
                 }
             }
             if ((_Scene_ is AGT.Forms.IAGT_SceneLoadDialog) && (_Scene_.State == SceneState.INIT))
             {
                 if (!_Scene_.ShowSplashScreen)
                 {
                     AGT.Forms.AGT_SceneLoadDialog s2 = new AGT.Forms.AGT_SceneLoadDialog(_VIDEO_DEVICE_,
                         (AGT.Forms.IAGT_SceneLoadDialog)_Scene_);
                     s2.ShowDialog();
                     s2.Dispose();
                 }
             }
             _Scene_.State = SceneState.RENDER;
         }
     }
 }