Skip to content

Commit

Permalink
updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
The-AhmadAA committed Aug 25, 2023
1 parent 3d2f6cb commit b2e61b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
* Task for the Tower Idle State - specifically for the
* Weapon Tower Entity that can move between combat and
* idle states. Scans for enemy mobs but does nothing else.
*
* ====================== CURRENTLY NOT IN USE ==================================
* This task may be modified for use in future features but is not required
* for current functionality
*/
public class TowerIdleTask extends DefaultTask implements PriorityTask {
private static final Logger logger = LoggerFactory.getLogger(MovementTask.class);
Expand All @@ -34,6 +38,8 @@ public class TowerIdleTask extends DefaultTask implements PriorityTask {
private final short TARGET = PhysicsLayer.NPC;

/**
* Instantiates a TowerIdleTask which scans for mobs at a certain
* time interval.
* @param interval time between scanning for mobs, in seconds.
*/
public TowerIdleTask(float interval) {
Expand All @@ -45,11 +51,12 @@ public TowerIdleTask(float interval) {
}

/**
* Start waiting from now until interval has passed.
* Start the Idle task - waiting from current game time until interval has passed.
*/
@Override
public void start() {
super.start();
// Trigger the idle event
owner.getEntity().getEvents().trigger("idleStart");
endTime = timeSource.getTime() + (int)(this.interval * 1000);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import com.csse3200.game.rendering.AnimationRenderComponent;

/**
* This class listens to events relevant to a weapon tower state and plays the animation when one
* of the events is triggered.
* Listens for events relevant to a weapon tower state.
* Each event will trigger a certain animation
*/
public class TowerAnimationController extends Component {
AnimationRenderComponent animator;
Expand Down

0 comments on commit b2e61b8

Please sign in to comment.