Closed darozak closed 7 months ago
I created a pulsed animation for the power stat (https://github.com/darozak/Advolition/commit/e7e0be0c4029c4dc116983580060be0cb737de30). However, it is out of sync with the scanner or core modules which are causing the power draws.
It occurred to me that I should use the same timing and color cycles for both. This means that I should try to disconnect the animation code from the drawing code since the same animation cycles will need to be rendered in two separate contexts (i.e. one will cycle color in the stat display and the other will cycle color in the module display but both animation patterns are the same.)
I separated the animation class from the rendering class (https://github.com/darozak/Advolition/commit/246fd02cdfbd8f7c816a0d8223c3c086323470b2). This allowed me to sync the color changes for the quipped modules and the power levels. It works well!
I just created an animation sequence that will cause each of a robot's equipped items to flash blue when in use by the robot (https://github.com/darozak/Advolition/commit/50372e2c516add2185cf71883908962b888db25c). At the same time, I should turn the power stat blue to alert the user that the robot is loosing power.