void Start() { Instance = this; manager = KinectManager.Instance; Parent = GameObject.Find("Users"); if (manager != null) { sensorData = manager.GetSensorData(); depthWidth = manager.GetDepthImageWidth(); depthHeight = manager.GetDepthImageHeight(); sampledWidth = depthWidth / sampleSize; sampledHeight = depthHeight / sampleSize; //spaceCoords = new Vector3[depthWidth * depthHeight]; if (sensorData.depth2SpaceCoords == null) { sensorData.depth2SpaceCoords = new Vector3[depthWidth * depthHeight]; } vertexType = new byte[sampledWidth * sampledHeight]; vertexIndex = new int[sampledWidth * sampledHeight]; CreateMesh(sampledWidth, sampledHeight); } }
void Start() { Instance = this; Renderer = gameObject.GetComponent <Renderer>(); Light = GameObject.Find("SceneLight").GetComponent <Light>(); Prototyping = GameObject.Find("Prototyping").GetComponent <Prototyping>(); UserMeshVisualizer = GameObject.Find("UserMesh")?.GetComponent <UserMeshVisualizer>(); ApplySmoothing(); if (gameObject.GetComponent <LimitMesh>() != null) { LimitMesh = gameObject.GetComponent <LimitMesh>(); LimitingMesh = true; } //Desmond AirSticks.Right.NoteOn += ExplodeA; AirSticks.Left.NoteOn += ExplodeB; //Gran Related cuts AirSticks.Right.NoteOn += () => GranRelatedOn(AirSticks.Hand.Right); AirSticks.Left.NoteOn += () => GranRelatedOn(AirSticks.Hand.Left); AirSticks.Right.NoteOff += GranRelatedOff; AirSticks.Left.NoteOff += GranRelatedOff; Iridescence = gameObject.GetComponent <IridescenceController>(); MidiManager.OneFiveNine.Beep += BangOutline; gameObject.InstanceMaterial(); }