コード例 #1
0
        static void Main()
        {
            var scene = new EditorGame(new XnaMouse(), new XnaKeyboard());

            using (var game = new EnigmaGame(scene))
                game.Run();
        }
コード例 #2
0
ファイル: Level.xaml.cs プロジェクト: pquinn/time-sink
        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
ファイル: DialogueEdit.xaml.cs プロジェクト: pquinn/time-sink
        void Dialogue_Edit_Loaded(object sender, RoutedEventArgs e)
        {
            if (!isLoaded)
            {
                var mainWindow = this.TryFindParent<MainWindow>();
                Game = mainWindow.editor.Game;

                isLoaded = true;
            }
        }
コード例 #4
0
ファイル: Editor.xaml.cs プロジェクト: pquinn/time-sink
 void Editor_Loaded(object sender, RoutedEventArgs e)
 {
     if (!isLoaded)
     {
         Game = new EditorGame(xnaControl.Handle, (int)xnaControl.ActualWidth, (int)xnaControl.ActualHeight);
         isLoaded = true;
     }
 }
コード例 #5
0
ファイル: Dialogue.xaml.cs プロジェクト: pquinn/time-sink
        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;
            }
        }