Change background of animation piece.

This commit is contained in:
yukirij 2024-08-26 16:49:21 -07:00
parent 30c4036b9b
commit fa7202927e

View File

@ -657,14 +657,14 @@ const INTERFACE = {
if(target.player == piece.player) {
let x = MATH.lerp(to_x, from_x, time);
let y = MATH.lerp(to_y, from_y, time);
draw.piece(target, x, y);
draw.animation_piece(target, x, y);
} else {
draw.piece(target, to_x, to_y);
draw.animation_piece(target, to_x, to_y);
}
}
// Draw moving piece.
draw.piece(piece, x, y);
draw.animation_piece(piece, x, y);
if(Date.now() < INTERFACE_DATA.Animate.time) {
setTimeout(INTERFACE.render, 1000 / 30);
@ -751,7 +751,7 @@ const INTERFACE = {
}
}
piece(piece, x, y) {
animation_piece(piece, x, y) {
let radius = INTERFACE.Radius * this.scale;
let icon_radius = 0.69 * radius;
@ -767,7 +767,7 @@ const INTERFACE = {
this.ctx.fill();
// Draw background.
this.ctx.fillStyle = INTERFACE.Color.TileDark;
this.ctx.fillStyle = INTERFACE.Color.HintPlay;
this.ctx.beginPath();
this.hex(0.94);
this.ctx.fill();