2021-12-12 17:36:22 +01:00
|
|
|
import { tmrConstants, tmrColors, tmrTokenZIndex } from "../tmr-constants.js";
|
2021-02-11 02:48:27 +01:00
|
|
|
import { Draconique } from "./draconique.js";
|
|
|
|
|
|
|
|
export class DemiReve extends Draconique {
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
type() { return '' }
|
|
|
|
match(item) { return false; }
|
|
|
|
manualMessage() { return false }
|
|
|
|
async onActorCreateOwned(actor, item) { }
|
|
|
|
|
|
|
|
code() { return 'demi-reve' }
|
2021-02-12 12:50:17 +01:00
|
|
|
tooltip(actor) { return `Demi-rêve ${actor.name}` }
|
2021-02-11 02:48:27 +01:00
|
|
|
img() { return 'icons/svg/sun.svg' }
|
|
|
|
|
2021-02-12 18:31:49 +01:00
|
|
|
createSprite(pixiTMR) {
|
2021-02-11 02:48:27 +01:00
|
|
|
const sprite = pixiTMR.sprite(this.code(), {
|
|
|
|
color: tmrColors.demireve,
|
2021-02-12 15:01:10 +01:00
|
|
|
zIndex: tmrTokenZIndex.demireve,
|
2021-02-11 02:48:27 +01:00
|
|
|
taille: (tmrConstants.full * 0.7)
|
|
|
|
});
|
|
|
|
pixiTMR.animate(pixiApp => pixiApp.ticker.add((delta) => sprite.rotation -= 0.01 * delta));
|
|
|
|
return sprite;
|
|
|
|
}
|
|
|
|
}
|