Merge branch 'gh-pages' of http://github.com/teamsnowman/hextris into gh-pages
This commit is contained in:
commit
ea179a7292
5 changed files with 6 additions and 16 deletions
|
@ -24,7 +24,7 @@ function Block(fallingLane, color, iter, distFromHex, settled) {
|
|||
this.initializing = 1;
|
||||
this.ct = 0;
|
||||
//speed of block
|
||||
this.baseIter = iter;
|
||||
this.iter = iter;
|
||||
//number of iterations before starting to drop
|
||||
this.initLen = settings.creationDt;
|
||||
//side which block is attached too
|
||||
|
@ -69,8 +69,6 @@ function Block(fallingLane, color, iter, distFromHex, settled) {
|
|||
};
|
||||
|
||||
this.draw = function(attached, index) {
|
||||
this.iter = this.baseIter * spaceModifier;
|
||||
|
||||
this.height = settings.blockHeight;
|
||||
if (Math.abs(settings.scale - settings.prevScale) > 0.000000001) {
|
||||
this.distFromHex *= (settings.scale/settings.prevScale);
|
||||
|
@ -147,6 +145,8 @@ function Block(fallingLane, color, iter, distFromHex, settled) {
|
|||
if (gameState == 1) {
|
||||
localStorage.setItem("saveState", exportSaveState());
|
||||
}
|
||||
|
||||
this.iter = 2.25;
|
||||
this.tint = 0;
|
||||
}
|
||||
ctx.fillStyle = "#FFF";
|
||||
|
|
|
@ -155,7 +155,7 @@ function Clock(sideLength) {
|
|||
this.angle += this.angularVelocity;
|
||||
}
|
||||
|
||||
drawPolygon(this.x + gdx, this.y + gdy + this.dy, this.sides, this.sideLength, this.angle,arrayToColor(this.fillColor) , 0, 'rgba(0,0,0,0)');
|
||||
drawPolygon(this.x + gdx, this.y + gdy + this.dy, this.sides, this.sideLength, this.angle,arrayToColor(this.fillColor) , 0, 'rgba(0,0,0,0)');
|
||||
};
|
||||
}
|
||||
|
||||
|
|
10
js/input.js
10
js/input.js
|
@ -85,16 +85,6 @@ keypress.register_combo({
|
|||
}
|
||||
});
|
||||
|
||||
keypress.register_combo({
|
||||
keys: "space",
|
||||
on_keydown: function() {
|
||||
spaceModifier = 2;
|
||||
},
|
||||
on_keyup: function() {
|
||||
spaceModifier = 1;
|
||||
}
|
||||
});
|
||||
|
||||
keypress.register_combo({
|
||||
keys: "enter",
|
||||
on_keydown: function() {
|
||||
|
|
|
@ -120,7 +120,6 @@ var isGameOver = 3;
|
|||
var scoreAdditionCoeff = 1;
|
||||
var prevScore = 0;
|
||||
var numHighScores = 3;
|
||||
var spaceModifier = 1;
|
||||
|
||||
var highscores = [0, 0, 0];
|
||||
if(localStorage.getItem('highscores'))
|
||||
|
@ -148,6 +147,7 @@ setStartScreen();
|
|||
function resumeGame() {
|
||||
gameState = 1;
|
||||
hideUIElements();
|
||||
$('#pauseBtn').show();
|
||||
importing = 0;
|
||||
startTime = Date.now();
|
||||
waveone = saveState.wavegen || new waveGen(MainClock,Date.now(),[1,1,0],[1,1],[1,1]);
|
||||
|
|
|
@ -24,7 +24,7 @@ function waveGen(clock) {
|
|||
this.dt = 0;
|
||||
this.update = function() {
|
||||
this.currentFunction();
|
||||
this.dt += 16.6666667 * spaceModifier;
|
||||
this.dt += 16.6666667;
|
||||
this.computeDifficulty();
|
||||
if (this.dt - this.lastGen * (1/settings.creationSpeedModifier) > this.nextGen) {
|
||||
if (this.nextGen > 1000) {
|
||||
|
|
Loading…
Reference in a new issue