From 7f78b38319b80301fc9bc714de504b21f3ab2201 Mon Sep 17 00:00:00 2001 From: vivomo <929992114@qq.com> Date: Fri, 24 Nov 2023 18:28:01 +0800 Subject: [PATCH] feat: hunt style --- .../src/components/PIXIPlayers/Player.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/client/src/components/PIXIPlayers/Player.tsx b/packages/client/src/components/PIXIPlayers/Player.tsx index f0cebd4c..3e2a53a1 100644 --- a/packages/client/src/components/PIXIPlayers/Player.tsx +++ b/packages/client/src/components/PIXIPlayers/Player.tsx @@ -15,9 +15,18 @@ const textStyle = new PIXI.TextStyle({ fontFamily: '"MISS", Helvetica, sans-serif', fontSize: 12, fontWeight: '400', - stroke: '#000', + fill: '#000', wordWrap: true, -}) +}); + +const huntedTextStyle = new PIXI.TextStyle({ + align: 'center', + fontFamily: '"MISS", Helvetica, sans-serif', + fontSize: 12, + fontWeight: '400', + fill: '#f00', + wordWrap: true, +}); export interface IPlayer { // mud data field @@ -169,9 +178,7 @@ const Player = (props: IPlayer) => { anchor={0.5} x={cellSize / 2} y={-30} - style={Object.assign({}, textStyle, { - stroke: hunted ? '#f00' : '#000' - })} + style={hunted ? huntedTextStyle : textStyle} /> } {