public void Start() { Radio = GameObject.Find("RADIO").transform; guiUse = PlayMakerGlobals.Instance.Variables.FindFsmBool("GUIuse"); guiInteraction = PlayMakerGlobals.Instance.Variables.FindFsmString("GUIinteraction"); Hand = GameObject.Find("PLAYER").transform.Find("Pivot/AnimPivot/Camera/FPSCamera/1Hand_Assemble/Hand").GetComponent <PlayMakerFSM>(); RadioCDSwitch = transform.Find("ButtonsCD/RadioCDSwitch").GetComponent <SphereCollider>(); TrackChannelSwitch = transform.Find("ButtonsCD/TrackChannelSwitch").GetComponent <SphereCollider>(); Eject = transform.Find("ButtonsCD/Eject").GetComponent <SphereCollider>(); LCD = transform.Find("LCD").GetComponent <TextMesh>(); Raycast = GetComponent <InteractionRaycast>(); cdAudio = transform.Find("Speaker").GetComponent <AudioSource>(); Sled = transform.Find("Sled/cd_sled_pivot").GetComponent <Animation>(); Volumeknob = GetComponent <VolumeKnob>(); handler = GetComponent <CDHandler>(); GetRadio(); cdAudio.transform.SetParent(sourcepivot, false); if (GetComponent <BrennsAudioVisualizer>() != null) { audioVisualizer = GetComponent <BrennsAudioVisualizer>(); } }
public void Start() { Raycast = GetComponent <InteractionRaycast>(); Functions = GetComponent <CDPlayerFunctions>(); knob = transform.Find("Pivot/knob"); knobCollider = transform.Find("ButtonsCD/RadioVolume").GetComponent <SphereCollider>(); guiUse = PlayMakerGlobals.Instance.Variables.FindFsmBool("GUIuse"); guiInteraction = PlayMakerGlobals.Instance.Variables.FindFsmString("GUIinteraction"); knob.localEulerAngles = new Vector3(0f, -30 * KnobState, 0f); }