Initialize grid values in-line

This commit is contained in:
tverona1
2019-07-23 23:13:27 -07:00
parent 4d545de5bd
commit 06298e39a9
3 changed files with 3 additions and 9 deletions

View File

@@ -12,6 +12,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 20553fac56ec59645857c0732b787431, type: 3}
m_Name: OVRBuildConfig
m_EditorClassIdentifier:
androidSDKPath: C:\Users\tvero\AppData\Local\Android\Sdk
androidSDKPath:
gradlePath:
jdkPath:

View File

@@ -18,8 +18,8 @@ namespace QuestAppLauncher
[Serializable]
public class GridSize
{
public int rows;
public int cols;
public int rows = 3;
public int cols = 3;
}
public GridSize gridSize;

View File

@@ -146,12 +146,6 @@ namespace QuestAppLauncher
private void ProcessGridSize()
{
// Make sure grid size have sane value
if (0 == this.config.gridSize.cols && 0 == this.config.gridSize.rows)
{
// If not initialized, default to 3x3
this.config.gridSize.cols = 3;
this.config.gridSize.rows = 3;
}
this.config.gridSize.cols = Math.Min(this.config.gridSize.cols, 10);
this.config.gridSize.cols = Math.Max(this.config.gridSize.cols, 1);
this.config.gridSize.rows = Math.Min(this.config.gridSize.rows, 50);