Skip to content

Banana Slip Testing

Treff edited this page Oct 7, 2021 · 2 revisions

Banana Slip Testing

The Banana Slip Interaction utilities the AI Priority Task system, as the interaction is analogous to NPC movement.

Key Components

  • SlipTask: SlipTask is the task that runs the uncontrolled gliding movement of the player, it is a PriorityTask assigned to a AITaskComponent requiring a PhysicsMovementComponent
  • BananaPeelActions: This is a generic subclass of InteractableComponent, with unique modifications to call the SlipTask and initiate on collision not interaction.

Test Targets

SlipTask

  • SlipTask is only run when priority is non-negative
    • Test negative initialization of PriorityTask
    • Test that PriorityTask is not run while priority is negative
    • Test priority modification to be non-negative
    • Test that PriorityTask runs when non-negative
  • SlipTask runs subtask MovementTask to move player
    • Test that MovementTask is called and finished
    • Test that MovementTask can be called again on reinteraction (i.e. when PriorityTask.start() is run again)
    • Test that priority is modified to negative when MovementTask is finished with status FINISH.

BananaPeelActions

  • BananaPeelActions are collision based
    • Test that OnInteraction is called on collision, not on E press.
    • Test that OnInteraction Cannot be retriggered on E press.
  • BananaPeelActions modifies SlipTask priority to be non-negative
    • Test that BananaPeelActions cannot access SlipTask should it not exist
    • Test that BananaPeelActions can modify SlipTask priority.
    • Test that the shouldSlip boolean is true on collision, and false otherwise.
Clone this wiki locally