Exemple #1
0
        public static BoidManager Main()
        {
            if (main == null)
            {
                main = FindObjectOfType <BoidManager> ();

                if (main == null)
                {
                    Debug.LogError("Error: No Boid Manager instance in scene.");
                    Debug.Break();
                }
            }

            return(main);
        }
 private void Awake()
 {
     BoidManager.Main().boidActors.Add(this);
     behaviours = new List <BoidBehaviour> (GetComponents <BoidBehaviour> ());
 }
Exemple #3
0
 private void Awake()
 {
     main = this;
 }