Ejemplo n.º 1
0
        void Start()
        {
            GameObject pm = GameObject.Find("ParticleManager");

            if (pm)
            {
                pm.GetComponent <ParticleManager>().updateParticleBoundary(boundariesLow, boundariesHigh);
                //deal with editor placed objects
                ComputeAttractors ca = GameObject.Find("ParticleManager").GetComponentInChildren <ComputeAttractors>();
                foreach (GameObject g in GameObject.FindGameObjectsWithTag("Attractor"))
                {
                    ca.AddAttractor(new Vector2(g.transform.localPosition.x, g.transform.localPosition.y));
                }
            }
        }
Ejemplo n.º 2
0
 public override bool Place()
 {
     aIndex = ca.AddAttractor(new Vector2(this.transform.localPosition.x, this.transform.localPosition.y));
     return(true);
 }