// Use this for initialization void Start() { thrustControl = GameObject.FindObjectOfType <ThrustControl>(); cameraPinchZoom = GameObject.FindObjectOfType <CameraPinchZoom>(); accelerometerControl = GameObject.FindObjectOfType <AccelerometerControl>(); rope = GameObject.FindGameObjectWithTag("Rope"); player = GameObject.FindGameObjectWithTag("Player"); playArea = GameObject.FindGameObjectWithTag("Play Area"); }
/* * If in auto-update, the function just looks for the wrapper of filter component and assigns it to a variable. * Otherwise it instantiates a low pass filter. */ void Start() { if (shouldUseComponent) { accelerometerControl = GetComponent <AccelerometerControl>(); } else { lowPassFilter = new LowPassFilter <Vector3>(a, Vector3.zero); } }
void Start() { accelerometerControl = GameObject.FindGameObjectWithTag("Play Area"); accelerometerControlScript = GameObject.FindObjectOfType <AccelerometerControl>(); }