private void Awake() { instance = this; activeDemons.AddRange(GetComponentsInChildren <Demon>()); foreach (Demon demon in activeDemons) { demon.TargetPos = new Vector3(UnityEngine.Random.Range(patrolBounds.xMin, patrolBounds.xMax), UnityEngine.Random.Range(patrolBounds.yMin, patrolBounds.yMax)); } }
void Awake() { Instance = this; }