added sound
This commit is contained in:
parent
408d739581
commit
8b1e2d16c6
BIN
dist/sound/21099_45941-lq.ogg
vendored
BIN
dist/sound/21099_45941-lq.ogg
vendored
Binary file not shown.
0
dist/Affirm.ogg → dist/sound/Affirm.ogg
vendored
0
dist/Affirm.ogg → dist/sound/Affirm.ogg
vendored
0
dist/Blop.ogg → dist/sound/Blop.ogg
vendored
0
dist/Blop.ogg → dist/sound/Blop.ogg
vendored
0
dist/Blop2.ogg → dist/sound/Blop2.ogg
vendored
0
dist/Blop2.ogg → dist/sound/Blop2.ogg
vendored
0
dist/Click.ogg → dist/sound/Click.ogg
vendored
0
dist/Click.ogg → dist/sound/Click.ogg
vendored
0
dist/Failed.ogg → dist/sound/Failed.ogg
vendored
0
dist/Failed.ogg → dist/sound/Failed.ogg
vendored
0
dist/Tetris.ogg → dist/sound/Tetris.ogg
vendored
0
dist/Tetris.ogg → dist/sound/Tetris.ogg
vendored
8
dist/tetrion.js
vendored
8
dist/tetrion.js
vendored
@ -1067,7 +1067,7 @@ Tetris.prototype = {
|
|||||||
|
|
||||||
// Opener sequence completed
|
// Opener sequence completed
|
||||||
if(this.currentMinoInx > openers.getLength()) {
|
if(this.currentMinoInx > openers.getLength()) {
|
||||||
new Audio("./dist/Affirm.ogg").play();
|
new Audio("./dist/sound/Affirm.ogg").play();
|
||||||
if(this.isTimerOn) {
|
if(this.isTimerOn) {
|
||||||
var besttime = document.getElementById("besttime").value;
|
var besttime = document.getElementById("besttime").value;
|
||||||
var deltaTime = new Date().getTime() - this.sequencePrevTime;
|
var deltaTime = new Date().getTime() - this.sequencePrevTime;
|
||||||
@ -1339,7 +1339,7 @@ Tetris.prototype = {
|
|||||||
if(this._checkHint()) return;
|
if(this._checkHint()) return;
|
||||||
//this._fireShape();
|
//this._fireShape();
|
||||||
this._recurseGameState();
|
this._recurseGameState();
|
||||||
new Audio('./dist/Blop2.ogg').play();
|
new Audio('./dist/sound/Blop2.ogg').play();
|
||||||
}
|
}
|
||||||
this._draw();
|
this._draw();
|
||||||
this.isGameOver = checkGameOver(this.matrix);
|
this.isGameOver = checkGameOver(this.matrix);
|
||||||
@ -2735,14 +2735,14 @@ ShapeZR.prototype = {
|
|||||||
//Move the shape to the left
|
//Move the shape to the left
|
||||||
goLeft: function(matrix) {
|
goLeft: function(matrix) {
|
||||||
if (isShapeCanMove(this, matrix, 'left')) {
|
if (isShapeCanMove(this, matrix, 'left')) {
|
||||||
new Audio('./dist/Click.ogg').play();
|
new Audio('./dist/sound/Click.ogg').play();
|
||||||
this.x -= 1;
|
this.x -= 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//Move the shape to the right
|
//Move the shape to the right
|
||||||
goRight: function(matrix) {
|
goRight: function(matrix) {
|
||||||
if (isShapeCanMove(this, matrix, 'right')) {
|
if (isShapeCanMove(this, matrix, 'right')) {
|
||||||
new Audio('./dist/Click.ogg').play();
|
new Audio('./dist/sound/Click.ogg').play();
|
||||||
this.x += 1;
|
this.x += 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -383,7 +383,7 @@ Tetris.prototype = {
|
|||||||
|
|
||||||
// Opener sequence completed
|
// Opener sequence completed
|
||||||
if(this.currentMinoInx > openers.getLength()) {
|
if(this.currentMinoInx > openers.getLength()) {
|
||||||
new Audio("./dist/Affirm.ogg").play();
|
new Audio("./dist/sound/Affirm.ogg").play();
|
||||||
if(this.isTimerOn) {
|
if(this.isTimerOn) {
|
||||||
var besttime = document.getElementById("besttime").value;
|
var besttime = document.getElementById("besttime").value;
|
||||||
var deltaTime = new Date().getTime() - this.sequencePrevTime;
|
var deltaTime = new Date().getTime() - this.sequencePrevTime;
|
||||||
@ -655,7 +655,7 @@ Tetris.prototype = {
|
|||||||
if(this._checkHint()) return;
|
if(this._checkHint()) return;
|
||||||
//this._fireShape();
|
//this._fireShape();
|
||||||
this._recurseGameState();
|
this._recurseGameState();
|
||||||
new Audio('./dist/Blop2.ogg').play();
|
new Audio('./dist/sound/Blop2.ogg').play();
|
||||||
}
|
}
|
||||||
this._draw();
|
this._draw();
|
||||||
this.isGameOver = checkGameOver(this.matrix);
|
this.isGameOver = checkGameOver(this.matrix);
|
||||||
|
@ -795,14 +795,14 @@ ShapeZR.prototype = {
|
|||||||
//Move the shape to the left
|
//Move the shape to the left
|
||||||
goLeft: function(matrix) {
|
goLeft: function(matrix) {
|
||||||
if (isShapeCanMove(this, matrix, 'left')) {
|
if (isShapeCanMove(this, matrix, 'left')) {
|
||||||
new Audio('./dist/Click.ogg').play();
|
new Audio('./dist/sound/Click.ogg').play();
|
||||||
this.x -= 1;
|
this.x -= 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//Move the shape to the right
|
//Move the shape to the right
|
||||||
goRight: function(matrix) {
|
goRight: function(matrix) {
|
||||||
if (isShapeCanMove(this, matrix, 'right')) {
|
if (isShapeCanMove(this, matrix, 'right')) {
|
||||||
new Audio('./dist/Click.ogg').play();
|
new Audio('./dist/sound/Click.ogg').play();
|
||||||
this.x += 1;
|
this.x += 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user