Render the icon for a medal * @param {Vector2} pos - Screen space position * @param {number} size - Screen space size
(pos, size)
| 213 | * @param {number} size - Screen space size |
| 214 | */ |
| 215 | renderIcon(pos, size) |
| 216 | { |
| 217 | // draw the image or icon |
| 218 | if (this.image) |
| 219 | mainContext.drawImage(this.image, pos.x-size/2, pos.y-size/2, size, size); |
| 220 | else |
| 221 | drawTextScreen(this.icon, pos, size*.7, BLACK); |
| 222 | } |
| 223 | |
| 224 | // Get local storage key used by the medal |
| 225 | storageKey() { return medalsSaveName + '_' + this.id; } |
no test coverage detected