// Use this for initialization void Start() { copyGC = gridObject.GetComponent<GridController>(); copyVS = vertexSpawnerObject.GetComponent<VertexSpawner>(); copySC = selectorControllerObject.GetComponent<SelectorController>(); copyGG = cameraObject.GetComponent<GloblGUI>(); copyEC = cameraObject.GetComponent<ExportController>(); }
// Use this for initialization void Start() { selector = GameObject.Find("Selector").transform; // Get the selector selector.localScale = new Vector2(tileDims, tileDims); // Rescale it selectorcontroller = selector.GetComponent <SelectorController>(); // Get the controller }
void Awake() { singleton = this; }
// Use this for initialization void Start() { DefaultColors(); copyVS = GameObject.Find("VerticesSpawner").GetComponent<VertexSpawner>(); copySC = GameObject.Find("Selector").GetComponent<SelectorController>(); copyGG.WriteGizmoOnGUI(gameObject); copyGG.SayCurrentTransform(transform); }
private void Awake() { gc = FindObjectOfType <GameController>(); sc = FindObjectOfType <SelectorController>(); sc.turnChange += TurnChange; }
void Start() { selector = FindObjectOfType <SelectorController>(); }
// Use this for initialization void Start() { // Set this before calling into the realtime database. index = 0; questions = new string[1]; answersLeft = new string[1]; scoresLeft = new int[1]; answersRight = new string[1]; scoresRight = new int[1]; playerAnswersL = new string[1]; playerAnswersR = new string[1]; FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://taller-vertical-2018.firebaseio.com/"); DatabaseReference reference = FirebaseDatabase.DefaultInstance.RootReference; long totalQuestionSize = 0; FirebaseDatabase.DefaultInstance.GetReference("Data").Child("ScoreQuestions").GetValueAsync().ContinueWith(task => { if (task.IsFaulted) { } else if (task.IsCompleted) { DataSnapshot snapshot = task.Result; totalQuestionSize += snapshot.ChildrenCount; Debug.Log("Question Size: " + totalQuestionSize); } }); FirebaseDatabase.DefaultInstance.GetReference("Data").Child("SubjectQuestions").GetValueAsync().ContinueWith(task => { if (task.IsFaulted) { } else if (task.IsCompleted) { Debug.Log("Data found"); DataSnapshot snapshot = task.Result; subjectQuestionSize = snapshot.ChildrenCount; playerAnswersL = new string[subjectQuestionSize]; playerAnswersR = new string[subjectQuestionSize]; totalQuestionSize += subjectQuestionSize; questions = new string[totalQuestionSize]; answersLeft = new string[totalQuestionSize]; answersRight = new string[totalQuestionSize]; scoresLeft = new int[totalQuestionSize]; scoresRight = new int[totalQuestionSize]; for (int i = 0; i < subjectQuestionSize; i++) { //Debug.Log("Yupiii!!1!1!!11"); questions[i] = snapshot.Child("Question" + i).Child("Statement").Value.ToString(); //Debug.Log("Yupiii!!1!1!!11"); answersLeft[i] = snapshot.Child("Question" + i).Child("Options").Child("a").Value.ToString(); playerAnswersL[i] = answersLeft[i]; //Debug.Log("Yupiii!!1!1!!11"); answersRight[i] = snapshot.Child("Question" + i).Child("Options").Child("b").Value.ToString(); playerAnswersR[i] = answersRight[i]; Debug.Log("Yupiii!!1!1!!11"); scoresLeft[i] = 0; scoresRight[i] = 0; Debug.Log("i: " + i); } Debug.Log("Yupiii!!1!1!!11"); this.readScoreQuestions(); } }); //Initializing elements ButtonLeft = transform.GetChild(3).GetChild(0).GetComponent <SelectorController>(); ButtonRight = transform.GetChild(4).GetChild(0).GetComponent <SelectorController>(); audioSource = this.GetComponent <AudioSource>(); StartCoroutine("wait"); textBox = this.transform.GetChild(0).GetComponent <TextMesh>(); textAnswerLeft = this.transform.GetChild(1).GetComponent <TextMesh>(); textAnswerRight = this.transform.GetChild(2).GetComponent <TextMesh>(); }
public void InvertSelection() { SelectorController.InvertSelection(); }
// Use this for initialization void Start() { LoadPrefs(); isGridButton = true; isSelectButton = true; isMoveButton = false; isRotateButton = false; isBridgeButton = false; paramsButtonZone = new Rect(padding, padding, squareSize, squareSize); showGridButton = new Rect(padding, squareSize + 2*padding, squareSize, squareSize); newVertexRect = new Rect(padding, 2*(squareSize + padding) + padding, squareSize, squareSize); selectButtonZone = new Rect(padding, 3 * (squareSize + padding) + padding, squareSize, squareSize); moveButtonZone = new Rect(padding, 4 * (squareSize + padding) + padding, squareSize, squareSize); rotateButtonZone = new Rect(padding, 5 * (squareSize + padding) + padding, squareSize, squareSize); bridgeButtonZone = new Rect(padding, 6 * (squareSize + padding) + padding, squareSize, squareSize); clearButtonZone = new Rect(padding, 7 * (squareSize + padding) + padding, squareSize, squareSize); exportButtonZone = new Rect(padding, 8 * (squareSize + padding) + padding, squareSize, squareSize); moveMenusZone = new Rect(Screen.width - 3*padding - valueLength - contentLength, padding, 2*padding + valueLength + contentLength, titleHeight + 4*padding + 3*valueHeight); rotateMenusZone = new Rect(Screen.width - 3 * padding - valueLength - contentLength, padding, 2 * padding + valueLength + contentLength, titleHeight + 4 * padding + 3 * valueHeight); moveRotateTitleZone = new Rect(0, 0, moveMenusZone.width, titleHeight);//relative moveRotateContentZone = new Rect(padding, padding + moveRotateTitleZone.height, moveMenusZone.width - 2*padding, 2*padding + 3*valueHeight); StatusLineZone = new Rect(0, Screen.height - statusHeight, Screen.width, statusHeight); allScreenZone = new Rect(0, 0, Screen.width, Screen.height); paramsWindowZone = new Rect((Screen.width - paramsWindowWidth)/2, (Screen.height - paramsWindowHeight)/2, paramsWindowWidth, paramsWindowHeight); //closeParamsWindowButtonZone = new Rect(paramsWindowZone.xMax - closeButtonSize / 2, paramsWindowZone.yMin - closeButtonSize / 2, closeButtonSize, closeButtonSize); closeParamsWindowButtonZone = new Rect(paramsWindowZone.xMax, paramsWindowZone.yMin - closeButtonSize, closeButtonSize, closeButtonSize); toolbarZone = new Rect(0, 0, paramsWindowZone.width, toolbarHeight);//relative //settingsContentZone = new Rect(padding, padding + toolbarHeight, paramsWindowZone.width - 2*padding, paramsWindowZone.height - 2 * padding - toolbarHeight);//relative settingsContentZoneCentered = new Rect((paramsWindowZone.width - (float)centerZoneWidth) / 2, padding + toolbarHeight,centerZoneWidth, paramsWindowZone.height - 2 * padding - toolbarHeight); copyGC = gridObject.GetComponent<GridController>(); copyVS = vertexSpawnerObject.GetComponent<VertexSpawner>(); copySC = selectorObject.GetComponent<SelectorController>(); copyEC = gameObject.GetComponent<ExportController>(); paramsContentC = new GUIContent(paramsImgC); paramsContentG = new GUIContent(paramsImgG); xContentG = new GUIContent(xImgG); xContentC = new GUIContent(xImgC); gridContentC = new GUIContent(gridImgC); gridContentG = new GUIContent(gridImgG); selectContentC = new GUIContent(selectImgC); selectContentG = new GUIContent(selectImgG); moveContentC = new GUIContent(moveImgC); moveContentG = new GUIContent(moveImgG); rotateContentC = new GUIContent(rotateImgC); rotateContentG = new GUIContent(rotateImgG); bridgeContentC = new GUIContent(bridgeImgC); bridgeContentG = new GUIContent(bridgeImgG); vertexContentC = new GUIContent(vertexImgC); vertexContentG = new GUIContent(vertexImgG); clearContentC = new GUIContent(clearImgC); clearContentG = new GUIContent(clearImgG); exportContentC = new GUIContent(exportImgC); exportContentG = new GUIContent(exportImgG); keyString = FormKeyString(); paramsCameraSpeed = GlobalParameters.cameraSpeed / 8.0f; paramsMoveStep = GlobalParameters.moveStep; paramsRotateStep = GlobalParameters.rotateStep; paramsGridSize = GlobalParameters.gridSize; copyGC.SetSize(paramsGridSize); paramCurveStep = GlobalParameters.curveSteps; paramUseImgEffect = GlobalParameters.useImgEffect; paramLightining = GlobalParameters.lightining; paramBloomIntensity = GlobalParameters.bloomIntensity; paramUseAntialiasing = GlobalParameters.useAntialiasing; paramUseSSAO = GlobalParameters.useSSAO; gameObject.GetComponent<CameraController>().LoadParameters(); copyVS.UpdateBridgeCurveSteps(); }
public void UnselectSourceCollection(IEnumerable <object> itemSources) { SelectorController.UnselectSourceCollection(itemSources); }
public void UnselectAll() { SelectorController.UnselectAll(); }
internal void Unselect(ListViewItem listViewItem) { SelectorController.UnselectItem(listViewItem); }
public void SelectAll() { SelectorController.SelectAll(); }
//public string movesText; // Start is called before the first frame update void Start() { _selector = FindObjectOfType <SelectorController>(); _levelData = FindObjectOfType <LevelDataHolder>(); }