refactor: Colored

This commit is contained in:
cha0s 2021-02-13 08:13:53 -06:00
parent a49c08a825
commit b274e4f9bb

View File

@ -264,10 +264,16 @@ export default (latus) => class Vulnerable extends Trait {
const {amount, isDamage} = harm;
this.entity.emitParticle('harm', {
traits: {
Colored: {
state: {
red: isDamage ? 255 : 0,
green: isDamage ? 0 : 255,
blue: isDamage ? 0 : 128,
},
},
DomText: {
params: {
textStyle: {
color: isDamage ? '#FF0000' : '#00FF77',
fontFamily: 'joystix',
fontSize: `${this.constructor.harmTextSize(amount)}px`,
textShadow: [