Pixi.js How should HP write?
问题 How should HP write? Because HP will decrease, but I found that he will deform. Each time container.hpStatus.width- = 1; HP's icon will be distorted, especially HP = 0 is most obvious. enter image description here You Can Look My Codepen. app.ticker.add((delta) => { if (container.hpStatus.width > 0) { container.hpStatus.width -= 1; } else { container.hpStatus.width = 450; } }); How can i make sure he doesn't deform? 回答1: The hp bar is getting distorted because you are decreasing width of