void Awake() { instance = this; if (Microphone.devices.Length > 0) { microphoneInput = Microphone.Start(Microphone.devices[0], true, 999, 44100); microphoneInitialized = true; } }
// Use this for initialization void Start() { micInput = GetComponent <MicInput>(); audioPlayer = GetComponent <AudioSource>(); instructions = Resources.LoadAll <AudioClip>("Sounds"); string currentTarget = null; stage = -1; stages = new currentStageFunction[] { stage0, stage1, stage2, stage3, stage4, stage5, stage6, stage7 }; nextStage(); }
void Awake () { // Create a layer mask for the Shootable layer. shootableMask = LayerMask.GetMask ("Shootable"); // Set up the references. gunParticles = GetComponent<ParticleSystem> (); gunLine = GetComponent <LineRenderer> (); gunAudio = GetComponent<AudioSource> (); gunLight = GetComponent<Light> (); micInput = GetComponentInParent<MicInput> (); //micInput = //faceLight = GetComponentInChildren<Light> (); }
void Awake() { // Create a layer mask for the Shootable layer. shootableMask = LayerMask.GetMask ("Shootable"); // Set up the references. gunParticles = GetComponent<ParticleSystem> (); gunLine = GetComponent <LineRenderer> (); gunAudio = GetComponent<AudioSource> (); gunLight = GetComponent<Light> (); micInput = GetComponentInParent<MicInput> (); //micInput = //faceLight = GetComponentInChildren<Light> (); }
void AwakeMultiplayer() { m_MultiplayerController = GetComponent <MultiplayerController>(); m_MicInput = GetComponent <MicInput>(); if (m_MicInput != null) { var descriptor = new NetworkedTypeDescriptor( typeof(float), (value) => BitConverter.GetBytes((float)value), (bytes) => BitConverter.ToSingle(bytes, 0)); NetworkUser.RegisterDescriptorKey("micInput", descriptor); m_MicInput.OnMicLevelChanged += SendMicInput; } }
// Start is called before the first frame update void Start() { micPos = mic.GetComponent <MicInput>(); }
// Start mic when scene starts. private void OnEnable( ) { InitMic( ); isInitialized = true; Instance = this; }
// start mic when scene starts void OnEnable() { InitMic(); _isInitialized = true; Inctance = this; }
// Use this for initialization void Start() { playerT = GetComponent <Transform>(); mi = GetComponent <MicInput>(); }
void Awake() { instance = this; }
void OnEnable() { InitMic(); Instance = this; }