Пример #1
0
        static void Main()
        {
            var scene = new EditorGame(new XnaMouse(), new XnaKeyboard());

            using (var game = new EnigmaGame(scene))
                game.Run();
        }
Пример #2
0
        void LevelProperties_Loaded(object sender, RoutedEventArgs e)
        {
            if (!isLoaded)
            {
                mainWindow = this.TryFindParent<MainWindow>();
                Game = mainWindow.editor.Game;

                Game.LevelManager.LevelLoaded += new LevelLoadedEventHandler(Level_Loaded);

                isLoaded = true;
            }
        }
Пример #3
0
        void Dialogue_Edit_Loaded(object sender, RoutedEventArgs e)
        {
            if (!isLoaded)
            {
                var mainWindow = this.TryFindParent<MainWindow>();
                Game = mainWindow.editor.Game;

                isLoaded = true;
            }
        }
Пример #4
0
 void Editor_Loaded(object sender, RoutedEventArgs e)
 {
     if (!isLoaded)
     {
         Game = new EditorGame(xnaControl.Handle, (int)xnaControl.ActualWidth, (int)xnaControl.ActualHeight);
         isLoaded = true;
     }
 }
Пример #5
0
        void Dialogue_Loaded(object sender, RoutedEventArgs e)
        {
            if (!isLoaded)
            {
                var mainWindow = this.TryFindParent<MainWindow>();
                Game = mainWindow.editor.Game;
                //mainWindow.editor.EntityAdded += new EntityAddedEventHandler(Dialogue_Added);
                mainWindow.LevelChanged += new LevelChangedEventHandler(Level_Changed);
                prompts = new List<NPCPrompt>();

                DialogueIds = new ObservableCollection<string>(prompts.Select(x => x.Id.ToString()));
                dialogueIds.ItemsSource = DialogueIds;

                dialogueEdit.Game = Game;

                isLoaded = true;
            }
        }