private void Start() { LogicComponentFactory = new SPLogicComponentFactory(Foreground); MessageBoxFactory = new UIMessageBoxFactory(); RunButton = FindObjectOfType <UIOverlayControlRunButton>(); Assert.IsNotNull(RunButton); }
protected override void Awake() { base.Awake(); OutConnectors.AddRange(Enumerable.Repeat <SPConnector>(null, 1)); // Set up renderer SpriteRenderer = gameObject.GetComponent <SpriteRenderer>(); CurrentSpriteIndex = 0; // Set up connectors OutConnector = Instantiate(SPOutConnectorPrefab, gameObject.transform, false); Assert.IsNotNull(OutConnector); OutConnector.gameObject.name = "OutConnector"; OutConnector.transform.localPosition = new Vector3(1, 0, -1); OutConnector.Register(this, SPConnectorType.SPOutConnector, 0); MessageBoxFactory = new UIMessageBoxFactory(); // Load the message box config for save ciruit TextAsset configAsset = Resources.Load <TextAsset>(CLOCK_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); ClockMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); LogicComponent = new Clock(DEFAULT_CLOCK_RATE); Canvas.Circuit.AddComponent(LogicComponent); Assert.AreEqual(CLOCK_SPRITES_COUNT, UnselectedClockSprites.Count); Assert.AreEqual(CLOCK_SPRITES_COUNT, SelectedClockSprites.Count); }
private void Awake() { MessageBoxFactory = new UIMessageBoxFactory(); // Load the message box config for not in challenge mode TextAsset configAsset = Resources.Load <TextAsset>(NOT_IN_CHALLENGE_MODE_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); NotInChallengeModeMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); // Load the message box config for completing a challenge configAsset = Resources.Load <TextAsset>(CHALLENGE_COMPLETE_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); ChallengeCompleteConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); // Load the message box config for incomplete solution for activate all outputs mode configAsset = Resources.Load <TextAsset>(ACTIVATE_ALL_OUTPUTS_INCOMPLETE_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); ActivateAllOutputs_IncompleteMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); // Load the message box config for incomplete solution for match test cases mode configAsset = Resources.Load <TextAsset>(MATCH_TEST_CASES_INCOMPLETE_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); MatchTestCases_IncompleteMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); }
private void Awake() { MessageBoxFactory = new UIMessageBoxFactory(); // Load the message box config for setting the internal clock TextAsset configAsset = Resources.Load <TextAsset>(INTERNAL_CLOCK_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); InternalClockMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); }
private void Awake() { MessageBoxFactory = new UIMessageBoxFactory(); // Load the message box config for setting the internal clock TextAsset configAsset = Resources.Load <TextAsset>(SET_MULTISTEP_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); SetMultistepMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); }
private void Awake() { MessageBoxFactory = new UIMessageBoxFactory(); // Load the message box config for unsaved changes var configAsset = Resources.Load <TextAsset>(UNSAVED_CHANGES_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); UnsavedChangesMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); }
private void Awake() { MessageBoxFactory = new UIMessageBoxFactory(); // Load the message box config for import circuit TextAsset configAsset = Resources.Load <TextAsset>(IMPORT_CIRCUIT_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); ImportCircuitMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); // Load the message box config for import error configAsset = Resources.Load <TextAsset>(IMPORT_ERROR_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); ImportErrorMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); }
private void Awake() { MessageBoxFactory = new UIMessageBoxFactory(); SelectedFilenameStash = new Stack <string>(); // Load the message box config for open circuit TextAsset configAsset = Resources.Load <TextAsset>(PLAY_CHALLENGE_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); PlayChallengeMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); // Load the message box config for open error configAsset = Resources.Load <TextAsset>(OPEN_ERROR_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); OpenErrorMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); // Load the message box config for unsaved changes configAsset = Resources.Load <TextAsset>(UNSAVED_CHANGES_MESSAGE_BOX_CONFIG_RESOURCE); Assert.IsNotNull(configAsset); UnsavedChangesMessageBoxConfig = JsonUtility.FromJson <MessageBoxConfig>(configAsset.text); }