// Start is called before the first frame update void Start() { SplatCounts = new int[5] { 0, 0, 0, 0, 0 }; // R, G, B, M, Y // instantiate launcher here launcher = GameObject.FindGameObjectsWithTag("Launcher")[0]; drawMeter = launcher.GetComponent <DrawMeter>(); arcList = drawMeter.CreateArcList(); flasher = launcher.GetComponent <P300_ArchFlashes>(); launcher.SetActive(false); markerStream = GameObject.FindGameObjectsWithTag("MarkerStream")[0]; inlet = markerStream.GetComponent <Inlet_P300>(); }
// Start is called before the first frame update void Start() { //Get the screen refresh rate, so that the colours can be set appropriately resol = Screen.resolutions; refreshRate = resol[3].refreshRate; //Set up LSL Marker Stream marker = FindObjectOfType <LSLMarkerStream>(); if (GameObject.FindGameObjectsWithTag("Launcher").Length > 0) { drawMeter = GameObject.FindGameObjectWithTag("Launcher").GetComponent <DrawMeter>(); List <Shapes2D.Shape> shapes = drawMeter.CreateArcList(); print(shapes.Count); } //Setting up Keys, to lock other keys when one simulation is being run keyLocks.Add(KeyCode.R, false); keyLocks.Add(KeyCode.S, false); keyLocks.Add(KeyCode.D, false); locked_keys = false; //Check to see if inputs are valid, if not, then don't draw matrix and prompt user to redraw with the //correct inputs if (CheckEmpty()) { print("Values must be non-zero and non-negative, please re-enter values and press 'D' to redraw..."); locked_keys = true; return; } //Initialize Matrix SetUpMatrix(); SetUpSingle(); SetUpRC(); SaveCurrentInfo(); //Set the colour of the box to the given offColour TurnOff(); System.Threading.Thread.Sleep(2000); SendInfo(); }