Add the mana colour onto mana cards

develop
Nathan Steel 1 year ago
parent 89391f5bbb
commit 40e85730ba

@ -213,6 +213,21 @@ class Board{
ctx.fillStyle = '#000';
ctx.fillText(deckLength, textx, texty);
}
// If the item is a mana, draw the mana colour within it
// Temp solution, but works for UI and testing
if(boardElement[itemKey] == 'mana'){
// TODO: Seperate this into a 'drawMana' or something?
let manaColour = new Shape({
shape: 'circle',
//name: 'deckCountererer',
x: positionX + width/2,
y: positionY + height/2,
width: width*.75,
height: height*.75,
fillStyle: fill // Fill should be the card's main colour
});
manaColour.draw();
}
}
isFaceUp(itemKey){
if(cardFace[itemKey] == 1){

Loading…
Cancel
Save