// Use this for initialization void Start() { guiText = gameObject.GetComponent<GUIText>(); textBackground = GameObject.Find("ScoreBackground").GetComponent<GUITexture>(); mic = GameObject.Find ("Beat Detector").GetComponent<MicrophoneInput>(); player = GameObject.Find ("Player").GetComponent<Movement>(); }
void Start() { if (objectToSpawn == null) Debug.LogError("You need to set a prefab to Object To Spawn -parameter in the editor!"); if (audioInputObject == null) audioInputObject = GameObject.Find("AudioInputObject"); micIn = (MicrophoneInput) audioInputObject.GetComponent("MicrophoneInput"); }
// Use this for initialization void Start() { animator = GetComponent<Animator>(); if (audioInputObject == null) audioInputObject = GameObject.Find("MicMonitor"); micIn = (MicrophoneInput)audioInputObject.GetComponent("MicrophoneInput"); }
void Awake() { // singleton if(instance == null) instance = this; else if(instance != this) Destroy(gameObject); audioSource = GetComponent<AudioSource>(); }
void Start() { audioInputObject = GameObject.Find("AudioInput"); micIn = (MicrophoneInput) audioInputObject.GetComponent("MicrophoneInput"); audioSource = gameObject.GetComponent<AudioSource>(); audioSource.clip = audioClip; }
// Use this for initialization void Start() { gui_text = this.GetComponent<GUIText>(); if (audioInputObject == null) audioInputObject = GameObject.Find("MicMonitor"); micIn = (MicrophoneInput)audioInputObject.GetComponent("MicrophoneInput"); }
MicrophoneInput micIn; //宣告指定自己寫的腳本的變數名稱 但還沒不能用來抓取數值 #endregion Fields #region Methods void Start() { if (objectToSpawn == null) Debug.LogError("You need to set a prefab to Object To Spawn -parameter in the editor!"); if (audioInputObject == null) audioInputObject = GameObject.Find("AudioInputObject"); print(" error "+audioInputObject.name); micIn = (MicrophoneInput) audioInputObject.GetComponent("MicrophoneInput"); //指定取得指定物件的指定腳本MicrophoneInput裡的變數,該腳本的變數不用宣告為靜態(static)變數 }
void Start() { syllableText = GetComponent <Text>(); mInput = GameObject.FindObjectOfType <MicrophoneInput>(); }
// Use this for initialization void Start() { microphoneInput = GetComponent <MicrophoneInput>(); StartCoroutine(RunTestCoroutine()); }
// Use this for initialization void Start() { // Primitives objectsParent = GameObject.Find("ObjectsParent"); primitives = new GameObject[primitiveNum]; for( int i = 0; i < primitiveNum; i++) { primitives[i] = Instantiate( primitive, new Vector3(), Quaternion.identity) as GameObject; primitives[i].layer = 0; primitives[i].transform.parent = objectsParent.transform; } // NGUI posXSlider = GameObject.Find( "posX" ).gameObject.GetComponent<UISlider>(); posXLabel = GameObject.Find( "posX" ).gameObject.transform.FindChild( "Thumb" ).gameObject.transform.FindChild( "Value" ).gameObject.GetComponent<UILabel>(); posYSlider = GameObject.Find( "posY" ).gameObject.GetComponent<UISlider>(); posYLabel = GameObject.Find( "posY" ).gameObject.transform.FindChild( "Thumb" ).gameObject.transform.FindChild( "Value" ).gameObject.GetComponent<UILabel>(); posZSlider = GameObject.Find( "posZ" ).gameObject.GetComponent<UISlider>(); posZLabel = GameObject.Find( "posZ" ).gameObject.transform.FindChild( "Thumb" ).gameObject.transform.FindChild( "Value" ).gameObject.GetComponent<UILabel>(); rotateXSlider = GameObject.Find("rotateX").gameObject.GetComponent<UISlider>(); rotateXLabel = GameObject.Find("rotateX").gameObject.transform.FindChild("Thumb").gameObject.transform.FindChild("Value").gameObject.GetComponent<UILabel>(); rotateYSlider = GameObject.Find("rotateY").gameObject.GetComponent<UISlider>(); rotateYLabel = GameObject.Find("rotateY").gameObject.transform.FindChild("Thumb").gameObject.transform.FindChild("Value").gameObject.GetComponent<UILabel>(); rotateZSlider = GameObject.Find("rotateZ").gameObject.GetComponent<UISlider>(); rotateZLabel = GameObject.Find("rotateZ").gameObject.transform.FindChild("Thumb").gameObject.transform.FindChild("Value").gameObject.GetComponent<UILabel>(); scaleXSlider = GameObject.Find("scaleX").gameObject.GetComponent<UISlider>(); scaleXLabel = GameObject.Find("scaleX").gameObject.transform.FindChild("Thumb").gameObject.transform.FindChild("Value").gameObject.GetComponent<UILabel>(); scaleYSlider = GameObject.Find("scaleY").gameObject.GetComponent<UISlider>(); scaleYLabel = GameObject.Find("scaleY").gameObject.transform.FindChild("Thumb").gameObject.transform.FindChild("Value").gameObject.GetComponent<UILabel>(); scaleZSlider = GameObject.Find("scaleZ").gameObject.GetComponent<UISlider>(); scaleZLabel = GameObject.Find("scaleZ").gameObject.transform.FindChild("Thumb").gameObject.transform.FindChild("Value").gameObject.GetComponent<UILabel>(); GameObject _toggleGlobalRotate = GameObject.Find("bGlobalRotate").gameObject; toggleGlobalRotate = _toggleGlobalRotate.GetComponent<UIToggle>(); threshSlider = GameObject.Find("thresh").gameObject.GetComponent<UISlider>(); colorRSlider = GameObject.Find("colorR").gameObject.GetComponent<UISlider>(); colorRLabel = GameObject.Find("colorR").gameObject.transform.FindChild("Thumb").gameObject.transform.FindChild("Value").gameObject.GetComponent<UILabel>(); colorGSlider = GameObject.Find("colorG").gameObject.GetComponent<UISlider>(); colorGLabel = GameObject.Find("colorG").gameObject.transform.FindChild("Thumb").gameObject.transform.FindChild("Value").gameObject.GetComponent<UILabel>(); colorBSlider = GameObject.Find("colorB").gameObject.GetComponent<UISlider>(); colorBLabel = GameObject.Find("colorB").gameObject.transform.FindChild("Thumb").gameObject.transform.FindChild("Value").gameObject.GetComponent<UILabel>(); colorASlider = GameObject.Find("colorA").gameObject.GetComponent<UISlider>(); colorALabel = GameObject.Find("colorA").gameObject.transform.FindChild("Thumb").gameObject.transform.FindChild("Value").gameObject.GetComponent<UILabel>(); //GameObject _toggleFill = GameObject.Find("bFill").gameObject; //toggleFill = _toggleFill.GetComponent<UIToggle>(); //GameObject _toggleReverse = GameObject.Find("bReverseTog").gameObject; //toggleReverse = _toggleReverse.GetComponent<UIToggle>(); GameObject _toggleRandom = GameObject.Find("bRandom").gameObject; toggleRandom = _toggleRandom.GetComponent<UIToggle>(); mic = GameObject.Find("AudioInput").gameObject.GetComponent<MicrophoneInput>(); }
// Use this for initialization void Start () { if (audioInputObject == null) audioInputObject = GameObject.Find("MicMonitor"); micIn = (MicrophoneInput) audioInputObject.GetComponent<MicrophoneInput>(); }
void Awake() { MicrophoneInput.InitMain(); }
private void Reset() { _microphone = GetComponent <MicrophoneInput>(); }
// Use this for initialization void Start() { input = GameObject.Find("Beat Detector").GetComponent<MicrophoneInput>(); totalBeatsLastFrame = input.totalBeats; last_input = Time.time; }
void Awake() { Instance = this; }
// Start is called before the first frame update void Start() { panelOver.SetActive(false); mic = GetComponent <MicrophoneInput>(); }