public virtual void Awake() { animators = new List<animate> (); registerAnimators (this.gameObject); bGlobals = beatGlobals.Instance; lRend = transform.GetComponent<LineRenderer> (); Trail = new Vector3[trailAlloc]; }
public GameObject Create() { bGlobals = beatGlobals.Instance; minScale = beatGlobals.Instance.minBulbScale; maxScale = beatGlobals.Instance.maxBulbScale; activeStroke = null; strokes = new List<Stroke> (); center = Vector3.zero; display = Instantiate (beatGlobals.Instance.bulbDisplay);// GameObject.CreatePrimitive (PrimitiveType.Sphere); // display.GetComponent<SphereCollider> ().enabled = false; // display.GetComponent<Renderer> ().sharedMaterial.color = new Color(1, 1, 1, .2f); return display; }
// Use this for initialization void Start() { Application.targetFrameRate = 60; bGlobals = beatGlobals.Instance; // bGlobals.clips = clips; bulbs = new List<GameObject> (); activeBulb = null; for (int i = 0; i < amount; i++) { GameObject b = new GameObject (); Bulb c = b.AddComponent<Bulb> (); c.Create (); // c.trailMat = trailMat; c.clip = bGlobals.clips [0]; c.setCenter(new Vector3( Mathf.Sin( ((float)i/(float)amount)*Mathf.PI*2)*radius, height, Mathf.Cos( ((float)i/(float)amount)*Mathf.PI*2)*radius)); bulbs.Add (b); } }
void Awake() { beat = beatGlobals.Instance; }