public static void LoadArt() { var defaultFolderPath = EditorPrefs.GetString("textureExplorerUoFolder", Application.dataPath); var folderPath = EditorUtility.OpenFolderPanel("Choose UO folder", defaultFolderPath, string.Empty); if (string.IsNullOrEmpty(folderPath)) { return; } if (Directory.Exists(folderPath) == false) { return; } EditorPrefs.SetString("textureExplorerUoFolder", folderPath); ConsoleRedirect.Redirect(); Log.Start(LogTypes.All); Settings.GlobalSettings = new Settings(); Settings.GlobalSettings.UltimaOnlineDirectory = folderPath; Client.Game = new GameController(); //Calling the getter to trigger the creation of GraphicsDevice var graphicsDevice = Client.Game.GraphicsDevice; ArtLoader.Instance.Load().Wait(); GumpsLoader.Instance.Load().Wait(); loaded = true; }
// Start is called before the first frame update void Start() { ConsoleRedirect.Redirect(); RioCommProtocol.startComm(4145, "10.41.45.2"); lastSendingPacket = RioCommProtocol.getSending(); lastSendingPacket.addJoystick(ref joy); lastRecievingPacket = RioCommProtocol.getRecieving(); }
public void cast_to_1_when_default_choice_is_selected() { var sut = new Choice("question"); var redirect = new ConsoleRedirect(); string typedText = "y"; int response = 0; var output = redirect.Redirect(typedText, () => response = sut.Show <int>()); Assert.Equal(1, response); }
public void cast_to_true_when_default_choice_is_selected() { var sut = new Choice("question"); var redirect = new ConsoleRedirect(); string typedText = "y"; bool response = false; var output = redirect.Redirect(typedText, () => response = sut.Show <bool>()); Assert.True(response); }
public static void LoadArt() { ConsoleRedirect.Redirect(); Log.Start(LogTypes.All); Settings.GlobalSettings = JsonConvert.DeserializeObject <Settings>(Resources.Load <TextAsset>("settings").text); Client.Game = new GameController(); //Calling the getter to trigger the creation of GraphicsDevice var graphicsDevice = Client.Game.GraphicsDevice; ArtLoader.Instance.Load().Wait(); loaded = true; }
private void Awake() { ConsoleRedirect.Redirect(); Application.targetFrameRate = 60; StateManager.AddState(new BootState()); StateManager.AddState(new ServerConfigurationState(serverConfigurationUiParent)); StateManager.AddState(new DownloadState(downloadPresenter)); StateManager.AddState(new GameState(unityMain)); ServerConfigurationModel.Initialize(); StateManager.GoToState <BootState>(); }
public void menu_with_default_options_shows_numbers() { var items = new string[] { "one", "two" }; const string response = "2"; var menu = new Menu(items); var format = new MenuOptions().NumerationFormat; var redirect = new ConsoleRedirect(); var output = redirect.Redirect(response, () => menu.Show()); using (var reader = new StreamReader(output)) { var choices = reader.ReadToEnd().Split(Environment.NewLine); Assert.Collection(choices.Take(2), //Ignore the last line with the user prompt x => Assert.Equal(string.Format(format, 1) + items[0], x), x => Assert.Equal(string.Format(format, 2) + items[1], x) ); } }
private void Awake() { ConsoleRedirect.Redirect(); UserPreferences.Initialize(); StateManager.AddState(new BootState()); StateManager.AddState(new ServerConfigurationState(serverConfigurationUiParent)); StateManager.AddState(new DownloadState(downloadPresenter, inGameDebugConsoleCanvas)); StateManager.AddState(new GameState(clientRunner, errorPresenter, inGameDebugConsoleCanvas)); Input.simulateMouseWithTouches = false; ServerConfigurationModel.Initialize(supportedServerConfigurations); StateManager.GoToState <BootState>(); ExternalStoragePath = GetAndroidExternalFilesDir(); }
private void Awake() { ConsoleRedirect.Redirect(); UserPreferences.TargetFrameRateChanged += OnTargetFrameRateChanged; UserPreferences.TextureFilteringChanged += UpdateTextureFiltering; UserPreferences.Initialize(); StateManager.AddState(new BootState()); StateManager.AddState(new ServerConfigurationState(serverConfigurationUiParent)); StateManager.AddState(new DownloadState(downloadPresenter, forceDownloadsInEditor, inGameDebugConsoleCanvas)); StateManager.AddState(new GameState(unityMain, errorPresenter, inGameDebugConsoleCanvas)); inGameDebugConsoleCanvas.enabled = false; ServerConfigurationModel.Initialize(); StateManager.GoToState <BootState>(); }
public void menu_with_accelerator_key_numeration_format() { var items = new string[] { "&one", "&two" }; const string response = "t"; var menu = new Menu(items, new MenuOptions { NumerationStyle = MenuNumeration.AcceleratorKey }); var format = menu.Options.NumerationFormat; var redirect = new ConsoleRedirect(); var output = redirect.Redirect(response, () => menu.Show()); using (var reader = new StreamReader(output)) { var choices = reader.ReadToEnd().Split(Environment.NewLine); Assert.Collection(choices.Take(2), //Ignore the last line with the user prompt x => Assert.Equal(items[0].Substring(1), x), x => Assert.Equal(items[1].Substring(1), x) ); } }
public void menu_with_upper_letter_numeration_format() { var items = new string[] { "one", "two" }; const string response = "A"; var menu = new Menu(items, new MenuOptions { NumerationStyle = MenuNumeration.AlphabeticUpper }); var format = menu.Options.NumerationFormat; var redirect = new ConsoleRedirect(); var output = redirect.Redirect(response, () => menu.Show()); using (var reader = new StreamReader(output)) { var choices = reader.ReadToEnd().Split(Environment.NewLine); Assert.Collection(choices.Take(2), //Ignore the last line with the user prompt x => Assert.Equal(string.Format(format, 'A') + items[0], x), x => Assert.Equal(string.Format(format, 'B') + items[1], x) ); } }
private void Awake() { ConsoleRedirect.Redirect(); UserPreferences.Initialize(); StateManager.AddState(new BootState()); StateManager.AddState(new ServerConfigurationState(serverConfigurationUiParent)); StateManager.AddState(new DownloadState(downloadPresenter, forceDownloadsInEditor, inGameDebugConsoleCanvas)); StateManager.AddState(new GameState(clientRunner, errorPresenter, inGameDebugConsoleCanvas)); if (hideInGameDebugConsoleOnAwake) { inGameDebugConsoleCanvas.enabled = false; } Input.simulateMouseWithTouches = false; ServerConfigurationModel.Initialize(supportedServerConfigurations); StateManager.GoToState <BootState>(); }
private void Awake() { ConsoleRedirect.Redirect(); UserPreferences.Initialize(); UserPreferences.ShowDebugConsole.ValueChanged += OnShowDebugConsoleChanged; OnShowDebugConsoleChanged(UserPreferences.ShowDebugConsole.CurrentValue); StateManager.AddState(new BootState()); StateManager.AddState(new ServerConfigurationState(serverConfigurationUiParent)); StateManager.AddState(new DownloadState(downloadPresenter, inGameDebugConsoleCanvas)); StateManager.AddState(new GameState(clientRunner, errorPresenter, inGameDebugConsoleCanvas)); Input.simulateMouseWithTouches = false; ServerConfigurationModel.Initialize(supportedServerConfigurations); StateManager.GoToState <BootState>(); //Commented out for now, will be used later once I have an SD card to test with //GetAndroidExternalFilesDir(); }
} // End of Awake(). private void Start() { ConsoleRedirect.Redirect(); Assembly.onCreation += OnAssemblyCreation; colony = Colony.Create(size); } // End of Start().