// Use this for initialization void Start() { amyModel = HumanoidStore.GetAmyModel(); chanionModel = HumanoidStore.GetChanionModel(); enemiesModels = HumanoidStore.GetEnemiesModels(); enemyMarkers = EnemyMarkerStore.GetEnemyMarkers(); }
void Start() { humanoidSubscribers.Add(HumanoidStore.GetAmyModel()); humanoidSubscribers.Add(HumanoidStore.GetChanionModel()); foreach (AIHumanoidModel enemy in HumanoidStore.GetEnemiesModels()) { humanoidSubscribers.Add(enemy); } }
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); }); }); }
public bool KeepDestination(MapNode node) { List <AIHumanoidModel> allies = HumanoidStore.GetEnemiesModels(); bool free = true; Vector3 nodeLocation = node.GetLocation(); Vector2 nodeLocation2D = nodeLocation.To2D(); foreach (AIHumanoidModel ally in allies) { if (Vector3.Distance(ally.InfoGetCenterBottom(), nodeLocation) < occupancyRadius) { free = false; break; } } return(free && node.IsCoverNode() && attackPlanner.TooCloseToEnemyBounds( enemyAvoidanceRadius )); }
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; }