Пример #1
0
        private void Start()
        {
            cc = GameObject.Find("Unit/Cell").GetComponent <CellController>();
            lc = GameObject.Find("Unit/Lungs").GetComponent <LungsController>();
            var paths = transform.GetChild("Waypoints").GetChildren();

            Waypoints = new Transform[paths.Length][];
            for (int i = 0; i < paths.Length; i++)
            {
                Waypoints[i] = paths[i].GetChildren();
            }
            var lungs_pos = Waypoints[0][Waypoints[0].Length - 1].position;

            GameObject.Find("Unit/Lungs").GetComponent <LungsController>().CreateLungs(lungs_pos);
            BuildManager.StateChanged += OnBuildStateChanged;
        }
Пример #2
0
 private void Start()
 {
     canvas = GameObject.Find("Canvas").transform;
     cc     = GameObject.Find("Unit/Cell").GetComponent <CellController>();
 }