Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
quick:design [2018/05/18 23:48]
pedro
quick:design [2018/11/15 11:39] (current)
pedro [In Behavior Bricks efficiency matters]
Line 345: Line 345:
         public GameObject prefab;         public GameObject prefab;
         public GameObject wanderArea;         public GameObject wanderArea;
 +        public GameObject player;
 +
  
         public int Spawns = 750;         public int Spawns = 750;
Line 352: Line 354:
         void Start()         void Start()
         {         {
-            entities =  +            entities = new List<​GameObject>​();​ 
-              ​new List<​GameObject>​(FindObjectsOfType(typeof(GameObject))  +            entities.Add(player);
-                as GameObject[]); +
-            entities.RemoveAll(e => e.GetComponent<​BehaviorExecutor>​() == null);+
             InvokeRepeating("​Spawn",​ 0f, 1.0f / 1000.0f);             InvokeRepeating("​Spawn",​ 0f, 1.0f / 1000.0f);
         }         }