()
| 73 | } |
| 74 | |
| 75 | drawFrame() { |
| 76 | // Check movement |
| 77 | if (this._eventQueue.length > 0) { |
| 78 | const event = this._eventQueue[0]; |
| 79 | |
| 80 | if (event.type === 'move') { |
| 81 | if (this._x === event.destX && this._y === event.destY) { |
| 82 | this._eventQueue.shift(); |
| 83 | } else { |
| 84 | this._x = Utility.getNextPos(this._x, event.destX, event.speedX); |
| 85 | this._y = Utility.getNextPos(this._y, event.destY, event.speedY); |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | // Check display or not. |
| 91 | if (!this.isDisplay()) { |
| 92 | return; |
| 93 | } |
| 94 | |
| 95 | this.clear(); |
| 96 | |
| 97 | this.save(); |
| 98 | this.drawObject(); |
| 99 | this._ctx.restore(); |
| 100 | |
| 101 | if (this.isAlert()) { |
| 102 | this.save(); |
| 103 | this._alert.lastCall = this.nextAlert(this.alertFunc, this._alert.lastCall, this._alert.interval); |
| 104 | this._ctx.restore(); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | drawObject() {} |
| 109 |
nothing calls this directly
no test coverage detected