public void OnClick() { PuzzleLogic.ResetPuzzle(); _distance = RaycastController.GetDistanceToCamera(RaycastController.HitInfo.point); _grabLocalPos = transform.InverseTransformPoint(RaycastController.HitInfo.point); _isManipulating = true; UIController.ClickManipulatable(); }
private void SetupThePuzzleGridStructure() { _puzzleLogic = new PuzzleLogic(_numRows); // Define rows and columns in the Grid for (int row = 0; row < _numRows; row++) { RowDefinition r = new RowDefinition(); r.Height = GridLength.Auto; this.RowDefinitions.Add(r); ColumnDefinition c = new ColumnDefinition(); c.Width = GridLength.Auto; this.ColumnDefinitions.Add(c); } Style buttonStyle = (Style)this.Resources["PuzzleButtonStyle"]; // Now add the buttons in int i = 1; for (int row = 0; row < _numRows; row++) { for (int col = 0; col < _numRows; col++) { // lower right cell is empty if (_numRows != 1 && row == _numRows - 1 && col == _numRows - 1) { continue; } KinectTileButton b = new KinectTileButton(); b.FontSize = 24; // Styling comes in only here... if (_styling) { b.Style = buttonStyle; } b.SetValue(Grid.RowProperty, row); b.SetValue(Grid.ColumnProperty, col); b.Content = i.ToString(); i++; this.Children.Add(b); } } }
public void StartGame() { gamePanel.gameObject.SetActive(true); size = INIT_SIZE + openedDoors / INIT_SIZE; showTip = false; currentTime = 0; gameOverPanel.SetActive(false); tipImage.gameObject.SetActive(false); logic = new PuzzleLogic(size); InitPictures(); logic.Start(); for (int i = 0; i < size * size * 30; i++) { logic.ShiftRandom(); } Refresh(); }
private void SetupTheGazeAugmentedPuzzleGridStructure() { //*** SET UP THE PUZZLE *** //define the row, column the button will appear in and the button style //create an instance of puzzleLogic _puzzleLogic = new PuzzleLogic(_numRows); // Define rows and columns in the Grid for (int row = 0; row < _numRows; row++) { RowDefinition r = new RowDefinition(); r.Height = GridLength.Auto; this.RowDefinitions.Add(r); ColumnDefinition c = new ColumnDefinition(); c.Width = GridLength.Auto; this.ColumnDefinitions.Add(c); } // Now add the buttons switch (_ConfigType) { case "T": { TrialConfig(); } break; case "A": { AConfig(); } break; case "B": { BConfig(); } break; } }
private void SetupTheDwellTimePuzzleGridStructure() { //*** SET UP THE PUZZLE *** //define the row, column the button will appear in and the button style //create an instance of puzzleLogic _puzzleLogic = new PuzzleLogic(_numRows); // Define rows and columns in the Grid for (int row = 0; row < _numRows; row++) { RowDefinition r = new RowDefinition(); r.Height = GridLength.Auto; this.RowDefinitions.Add(r); ColumnDefinition c = new ColumnDefinition(); c.Width = GridLength.Auto; this.ColumnDefinitions.Add(c); } // Now add the buttons switch (_ConfigType) { case "T": { TrialConfig(); } break; case "A": { AConfig(); } break; case "B": { BConfig(); } break; } }