-
Notifications
You must be signed in to change notification settings - Fork 1
Enemy NPC Test Cases
The following components are being tested as part of the enemy creation and combat feature:
create()
: Initialises the component and sets up event listeners
animateSpawn()
: Plays the "spawn" animation
animateChaseLeft()
: Plays the "walk" animation and flips the sprite to face left
animateChaseRight()
: Plays the "walk" animation and flips the sprite to face right
animateWanderLeft()
: Plays the "walk" animation and flips the sprite to face left
animateWanderRight()
: Plays the "walk" animation and flips the sprite to face right
create()
: Initialises the component and sets up event listeners
animateWanderLeft()
: Plays the "float" animation and flips the sprite to face left
animateWanderRight()
: Plays the "float" animation and flips the sprite to face right
animateChaseLeft()
: Plays the "angry_float" animation and flips the sprite to face left
animateChaseRight()
: Plays the "angry_float" animation and flips the sprite to face right
create()
: Initialises the component and sets up event listeners
animateRunDown()
: Plays the "run_down" animation, likely used when the character is running downwards
animateRunUp()
: Plays the "run_up" animation, likely used when the character is running upwards
animateRunLeft()
: Plays the "run_left" animation, likely used when the character is running to the left
animateRunRight()
: Plays the "run_right" animation, likely used when the character is running to the right
animateRunLeftDown()
: Plays the "run_left_down" animation, likely used when the character is running diagonally down to the left
animateRunRightDown()
: Plays the "run_right_down" animation, likely used when the character is running diagonally down to the right
animateRunLeftUp()
: Plays the "run_left_up" animation, likely used when the character is running diagonally up to the left
animateRunRightUp()
: Plays the "run_right_up" animation, likely used when the character is running diagonally up to the right
SpawnTask(Vector2 spawnPosition, float spawnDuration)
: Constructor for the SpawnTask class, initialises the task with the spawn position and duration
getSpawnPosition()
: Returns the position where the entity will be spawned
getSpawnDuration()
: Returns the duration of the spawn task
getElapsedTime()
: Returns the elapsed time since the spawn task started
getPriority()
: Returns the priority of this task, with higher values indicating higher priority
start()
: Starts the spawn task, positioning the entity at the spawn location and triggering the "spawnChicken" event
completeTask()
: Completes the spawn task, stopping it and cleaning up if necessary
stop()
: Stops the spawn task, cleaning up if necessary. Inherits from DefaultTask.