// Use this for initialization void Start() { arenaManager = GameObject.FindGameObjectWithTag("ArenaManager").GetComponent <ArenaWall>(); currentState = state.Wander; InvokeRepeating("AvoidObstacles", 0, 0.75f); PickWaypoint(); InvokeRepeating("CheckNearestCezium", 0, 0.5f); }
// Use this for initialization void Start() { arenaData = arenaManager.GetComponent <ArenaWall>(); SelectPoints(arenaData.radius, distanceThreshold); foreach (Vector3 coordinate in asteroidPoints) { GameObject newAsteroid = Instantiate(Asteroid, coordinate, Quaternion.identity) as GameObject; newAsteroid.transform.parent = gameObject.transform; } }