refactor: Colored
This commit is contained in:
parent
a49c08a825
commit
b274e4f9bb
|
@ -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: [
|
||||
|
|
Loading…
Reference in New Issue
Block a user