void AssignPos(ICombatDirector e) { Transform toFollow = GetNearPos(e.CurrentPos(), e.GetDistance()); e.SetTargetPosDir(toFollow); e.SetBool(true); }
public void GetNewNearPos(ICombatDirector e) { Transform pos = e.CurrentTargetPosDir(); positionsToAttack.Add(pos); e.SetTargetPosDir(GetNearPos(e.CurrentPos(), e.GetDistance())); }
public void AddToAttack(ICombatDirector e, EntityBase target) { if (target == head) { AddOrRemoveToList(e); } else { if (listAttackTarget.ContainsKey(target)) { if (listAttackTarget[target].Count >= maxEnemies) { e.SetTarget(head); AddOrRemoveToList(e); } else { Transform toFollow = GetNearPos(e.CurrentPos(), target); listAttackTarget[target].Add(e); e.SetTargetPosDir(toFollow); e.SetBool(true); } } } if (!run && listAttackTarget.Count > 0) { foreach (var item in listAttackTarget) { if (item.Value.Count >= 0) { RunDirector(); return; } } } }