// Start is called before the first frame update void Start() { // setup the game array shapes_array = new GameObject[3]; shapes_array[0] = shape1; shapes_array[1] = shape2; shapes_array[2] = shape3; // create a known origins array for each shape Origin0 = shapes_array[0].GetComponent <Transform>().position; Origin1 = shapes_array[1].GetComponent <Transform>().position; Origin2 = shapes_array[2].GetComponent <Transform>().position; origins_array[0] = Origin0; origins_array[1] = Origin1; origins_array[2] = Origin2; // Locate the "Trigger Plane" game object GameObject plane = GameObject.Find("Plane"); // Attach the Collector component to the trigger plane plane.AddComponent <Collector>(); // connect the GameManager script to the collector component on the trigger plane collector = plane.GetComponent <Collector>(); // attach a marquee to the trigger plane to receive broadcast plane.AddComponent <Marquee>(); //connect the GameManager script to the marquee component on the trigger plane marquee = plane.GetComponent <Marquee>(); // load the first shape into the marquee this.SetMarqueeObjectName(round); }
public void SetCollectorObjectName(Marquee marquee) { collector.objectName = marquee.object_name; }