// private bool audioPlaying = false; // private AudioSource audioSource; public void Start() { feedbackLamp = gameObject.GetComponent <MoodLight>(); arms = gameObject.GetComponent <ArmMovement>(); toolsReg = FindObjectOfType <ToolsRegistry>(); // audioSource = gameObject.GetComponent<AudioSource>(); ChangeColor(); ControlArms(); }
// Use this for initialization void Start() { //Get components lineRenderer = gameObject.GetComponent <LineRenderer>(); arm = gameObject.GetComponent <ArmMovement>(); //Setup the line renderer default values and create the control points. InitLineRenderer(); CreateControlPoints(); //curve.lineRenderer = lineRenderer; }
void Start() { arm = gameObject.GetComponent <ArmMovement>(); if (!lineRenderer) { lineRenderer = GetComponent <LineRenderer>(); } lineRenderer.sortingLayerID = layerOrder; //Split the points into curves of 3 points each, this allows us to use a cubic function on each curve instead of something more complex. curveCount = (int)controlPoints.Length / 3; }