protected void changeAnimationFrame() {
        if (this.isAttacking || gameOver) {
            if (this.framesToChangeTexture < 5) {
                framesToChangeTexture++;
            } else if (this.frameNum < this.currentTextures.length - 1) {
                framesToChangeTexture = 0;
                this.frameNum++;
            } else if (! gameOver){
                attackFinished();
                this.framesToChangeTexture = 0;
            }
        } else if (!(this.heroOwnHorizontalSpeed == 0)) {
            if (this.framesToChangeTexture < 5) {
                framesToChangeTexture++;
            } else if (this.frameNum < currentTextures.length - 1) {
                framesToChangeTexture = 0;
                this.frameNum++;
            } else {
                framesToChangeTexture = 0;
                this.frameNum = 0;
            }
        } else {
            this.frameNum = 0;
        }
    }