// Use this for initialization void Start() { amyModel = HumanoidStore.GetAmyModel(); chanionModel = HumanoidStore.GetChanionModel(); enemiesModels = HumanoidStore.GetEnemiesModels(); enemyMarkers = EnemyMarkerStore.GetEnemyMarkers(); }
void Awake() { GameObject amy = amyObject.transform.GetChild(0).gameObject; amyModel = amyObject.GetComponentInChildren <AmyModel>(); GameObject chanion = chanionObject.transform.GetChild(0).gameObject; chanionModel = chanionObject.GetComponentInChildren <ChanionModel>(); enemiesModels = new List <AIHumanoidModel>(); foreach (Transform enemy in enemiesObject.transform) { AIHumanoidModel model = enemy.GetComponent <AIHumanoidModel>(); if (model != null) { enemiesModels.Add(model); } } instance = this; }