// Start is called before the first frame update void Start() { mainCamera = Camera.main; currTouchAction = TouchAction.None; camAxisOfHorizRotation = Vector3.up; camAxisOfVertRotation = Vector3.right; rotationDegreesPerPixel = 0.1F; zoomDistPerPixel = 0.01F; panDistPerPixel = 0.01F; pieces = new List<GameObject>(); piecesRemovedWhileResettable = new List<GameObject>(); pieceControlsPanel.SetActive(false); startStopButton = startStopObject.GetComponent<Button>(); resetButton = resetObject.GetComponent<Button>(); clearAllButton = clearAllObject.GetComponent<Button>(); startStopButtonScript = startStopObject.GetComponent<StartStopButtonBehaviour>(); resetButtonScript = resetObject.GetComponent<ResetButtonBehaviour>(); eventSystem = GetComponent<EventSystem>(); // used here for graphic raycasting (i.e. knowing which 2D canvas item was touched) graphicRaycaster = canvas.GetComponent<GraphicRaycaster>(); clearDialogShowing = false; }
// Start is called before the first frame update void Start() { raycastingScript = mainScriptObject.GetComponent <RaycastingBehaviour>(); resetButtonScript = resetButtonObject.GetComponent <ResetButtonBehaviour>(); }