Attack Code Refactor


Attack Code Refactor

This week I refactored the Attack Code I did last week. Due to how I designed it last week it was limited to only be used on the Player. However the new changes I've made allow the script to be added to any attacker and have it work.  This week I also fixed a small bug which was happening with Pathfinding.  The bug  forced the move function to be called twice to run to have the object move. The fix was to change how the force stop was implemented and the order that it was called. 

Tasks this week:

  1. Changed how the attack script is interacted with. You can now call Attack(GameObject target) to attack specific target in range
  2. Changed speed variable on Pathfinding from private to public
  3. Fixed a bug in Pathfinding that forced the move function to be called twice to run. 

Leave a comment

Log in with itch.io to leave a comment.