// Use this for initialization void Start() { amyModel = HumanoidStore.GetAmyModel(); chanionModel = HumanoidStore.GetChanionModel(); enemiesModels = HumanoidStore.GetEnemiesModels(); enemyMarkers = EnemyMarkerStore.GetEnemyMarkers(); }
void Start() { amyTarget = HumanoidStore.GetAmyModel(); enemyMarkerLocations.ForEach(m => { EnemyMarker newMarker = new EnemyMarker(amyTarget, m.position, null); targeters.ForEach(t => { CommunicatableEnemyMarker newCMarker = new CommunicatableEnemyMarker( newMarker, 5 ); t.AddEnemyMarker(newCMarker); }); }); }
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; }