X-Git-Url: https://git.r.bdr.sh/rbdr/sumo/blobdiff_plain/b4a89078319901f662528268280e33201f2c0c17..bb8d5ef47baf7ad16a1bc58526f81ce332b090d6:/lib/systems/render_winner.js?ds=sidebyside diff --git a/lib/systems/render_winner.js b/lib/systems/render_winner.js index 73f948b..ecda168 100644 --- a/lib/systems/render_winner.js +++ b/lib/systems/render_winner.js @@ -1,5 +1,6 @@ import { System } from '@serpentity/serpentity'; import { Text } from 'pixi.js'; +import Tinycolor from 'tinycolor2'; import Config from '../config'; import WinnerNode from '../nodes/winner'; @@ -88,6 +89,8 @@ export default class RenderWinnerSystem extends System { // Right now this is final, once a winner is rendered you would need // to restart the whole system. if (internals.winnerText) { + const color = Tinycolor(internals.winnerText.tint.toString(16)); + internals.winnerText.tint = parseInt(color.spin(2).toString().substring(1,7), 16); return; } @@ -102,6 +105,7 @@ export default class RenderWinnerSystem extends System { fill: 0xffffff, align: 'center' }); + internals.winnerText.tint = 0xffbbff; internals.winnerText.scale.x = 0.125; internals.winnerText.scale.y = 0.125; internals.winnerText.position.x = Config.horizontalResolution / 2;