/// <summary> /// Resets the object's properties. /// </summary> public void Reset() { // Check if there is a rendering caller. renderingCaller = GetComponent <Rendering.Rendering>(); // Reset the key child components. _cameraSetup = CameraSetup.CreateOrResetCameraSetup(transform); _dataHandler = DataHandler.CreateOrResetDataHandler(transform); // Initialize the processing methods. _processingMethods = ProcessingMethod.CreateOrResetProcessingMethods(transform); for (int iter = 0; iter < _processingMethods.Length; iter++) { _processingMethods[iter].InitializeLinks(); } // Initialize the external tools. _externalHelpers = ExternalHelper.CreateOrResetExternalHelpers(transform); for (int iter = 0; iter < _externalHelpers.Length; iter++) { _externalHelpers[iter].InitializeLinks(); } // Get the method defining the container for the input images. _previewSourceImagesLoader = _processingMethods[0].PMColorTextureArray; // Reads the acquisition information from the source data directory. ReadAcquisitionInformation(); // Destroys all created method components. foreach (MonoBehaviour component in GetComponents <MonoBehaviour>()) { if (component is IMethodGUI) { DestroyImmediate(component); } } }
public CheckersGameViewModel() { if (loadFromFile == true) { Squares = new ObservableCollection <ObservableCollection <Square> >(ExternalHelper.InitGameBoardFromFile()); } else { Squares = new ObservableCollection <ObservableCollection <Square> >(InternalHelper.InitGameBoard()); } }
public static void verifyIsFinnish() { if (InternalHelper.redPieceOut == 12) { MessageBox.Show(" Player 1 is the winner!"); InternalHelper.WhiteWinners++; } if (InternalHelper.whitePieceOut == 12) { MessageBox.Show(" Player 2 is the winner!"); InternalHelper.RedWinners++; } ExternalHelper.WriteWinnersToFile(); }
private void SaveGameButton_Click(object sender, RoutedEventArgs e) { ExternalHelper.SaveGameInFile(); }
public PlayGameView() { InitializeComponent(); ExternalHelper.ReadWinnersFromFile(); }