Skip to content

Commit

Permalink
feat: hunt style
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivomo committed Nov 24, 2023
1 parent 25990ec commit 7f78b38
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions packages/client/src/components/PIXIPlayers/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
/>
}
{
Expand Down

0 comments on commit 7f78b38

Please sign in to comment.