public BowAttackBehavior(string targetCategory, float shootDistance, float maxDistance) : base(targetCategory, Arrow.FlightSpeed, maxDistance: maxDistance) { _followBehavior = new FollowBehavior(targetCategory, shootDistance) { MaxDistance = maxDistance }; TimeBetweenAttacks = TimeSpan.FromSeconds(2); }
/// <summary> /// Creates the follow behavior with the desired follow entity and the distance to keep. /// </summary> /// <param name="following">The entity to follow.</param> /// <param name="distance">The desired distance to keep.</param> public SwordAttackBehavior(string targetCategory) { _followBehavior = new FollowBehavior(targetCategory, distance: 24); }