()
| 881 | } |
| 882 | |
| 883 | private drawPlayerSpells(): void{ |
| 884 | // If there's at least one player spell |
| 885 | if(this.playerSpells.length > 0){ |
| 886 | var baseXPosition: number = ((this.renderArea.getWidth()-100) - this.getGap())/2; |
| 887 | |
| 888 | // Draw the spells |
| 889 | for(var i = 0; i < this.playerSpells.length; i++){ |
| 890 | this.playerSpells[i].draw(this.renderArea, new Pos(baseXPosition, 2)); |
| 891 | } |
| 892 | |
| 893 | // Draw the spell countdown |
| 894 | if(this.playerSpellsCountdown > 0){ |
| 895 | this.renderArea.drawString("(" + Math.ceil(this.playerSpellsCountdown/10).toString() + " sec)", baseXPosition + 92, 2); |
| 896 | this.renderArea.addColor(baseXPosition + 92, baseXPosition + 100, 2, new Color(ColorType.QUEST_COUNTDOWN)); |
| 897 | } |
| 898 | |
| 899 | // Draw the potion countdown |
| 900 | if(this.playerPotionsCountdown > 0){ |
| 901 | this.renderArea.drawString("(" + Math.ceil(this.playerPotionsCountdown/10).toString() + " sec)", baseXPosition + 92, 4); |
| 902 | this.renderArea.addColor(baseXPosition + 92, baseXPosition + 100, 4, new Color(ColorType.QUEST_COUNTDOWN)); |
| 903 | } |
| 904 | } |
| 905 | } |
| 906 | |
| 907 | private drawQuestLog(): void{ |
| 908 | this.getGame().getQuestLog().draw(this.renderArea, new Pos(((this.renderArea.getWidth()-100) - this.getGap())/2, this.renderArea.getHeight()-12)); |
no test coverage detected