public virtual void Initialize(MonsterMoveAction next, MonsterMoveAction after, MonsterTarget target, int index, string moveAnimation) { ImmediateMoveAction = next; UpcomingMoveAction = after; Target = target; moveIndex = index; MoveActionAnimation = moveAnimation; }
public void AddMonsterTarget(MonsterTarget newTarget) { if (MonsterTargets == null) { MonsterTargets = new List <MonsterTarget>(); } MonsterTargets.Add(newTarget); }
public MonsterTarget GetMonsterTarget(Vector3 monsterLocation, MonsterTarget currentBestTarget = null) { float currentInterestLevel = 0; if (currentBestTarget) { currentInterestLevel = GetTargetBaseInterest(monsterLocation, currentBestTarget) * 2; } foreach (MonsterTarget m in MonsterTargets) { float score = GetTargetBaseInterest(monsterLocation, m); if (score > currentInterestLevel) { currentInterestLevel = score; currentBestTarget = m; } } return(currentBestTarget); }
public MonsterMoveAction(MonsterMoveAction next, MonsterMoveAction after, MonsterTarget target, int index, string moveAnimation) { Initialize(next, after, target, index, moveAnimation); }
public void RemoveMonsterTarget(MonsterTarget oldTarget) { MonsterTargets.Remove(oldTarget); }
public DamageMonsterMoveAction(MonsterMoveAction next, MonsterMoveAction after, MonsterTarget target, int index, string moveAnimation) : base(next, after, target, index, moveAnimation) { }