Player Key Prompt System - UQdeco2800/2022-studio-2 GitHub Wiki

Sprint 3 & 4

The goal of key prompt system is to help the user to know each key bind in the game. To guide the player better play the game, instead of spending a lot of time learning all key binds. Users could see the helpful tips when they are crafting, interacting with the npc and moving around the map etc.

Main Function Explanation

keyPrompt(Fixture me, Fixture other)

In this function the key prompt is implemented by using the attributes of the touch attack component. When the player is colliding with another entity, the collide event would be triggered. And during the collision, the collided entity would be checked. If the entity could be interacted with the relevant key bind, then the animation for the key would be played.

PlayerKPAnimationController.java would be used to control all animations in the key prompt system. When an animation has been triggered, the relevant animation would be played.

When the player is not colliding with the other entity, the "collisionEnd" event would be triggered. And the "default" animation would be player which as known as no animation.

Explain Diagrams

UML Diagram

Sequence Diagram(S4)

Current Implementation Pictures

SPRINT 4

Testing Plan

Animation

According to last survey feedback for the sound effect, I would choose to speak with other teams during the studio face by face in order to get more useful feedback and suggestions for the animation design.

Code

The code for animation would use mock up entity to test whether the animation has been successfully added to the animator. The Junit test for this part has been implemented in the main branch.

Who To Talk To?

Hao Yang Wu (@whycoco#0430, whyhlf)

In Development

Will be adding more key promoting for other keys. And the animation would be user testing during the future studios.

Code Smells & Coverage