diff --git a/js_v8/initialization.js b/js_v8/initialization.js index 132cf63..3b2352d 100644 --- a/js_v8/initialization.js +++ b/js_v8/initialization.js @@ -77,6 +77,7 @@ function initialize(a) { if (/Mobile|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { settings = { + os: "other", platform: "mobile", startDist: 227, creationDt: 60, @@ -94,6 +95,7 @@ function initialize(a) { }; } else { settings = { + os: "other", platform: "nonmobile", baseScale: 1, startDist: 340, @@ -112,6 +114,9 @@ function initialize(a) { $("#inst_main_body").html("The goal of Hextris is to stop blocks from leaving the inside of the outer gray hexagon

" + (settings.platform != 'mobile' ? 'Press the right and left arrow keys' : 'tap the left and right sides of the screen') + " to rotate the Hexagon

Clear blocks and get points by making 3 or more blocks of the same color touch

Time left before your combo streak disappears is indicated shown by the colored lines in the outer hexagon

" + (settings.platform == 'mobile' ? 'Toggle speeding up the game by tapping the inner hexagon' : "Speed up the game 2x by holding the down arrow")); } + if(/Android/i.test(navigator.userAgent)) { + settings.os = "android"; + } window.canvas = document.getElementById('canvas'); window.ctx = canvas.getContext('2d'); diff --git a/js_v8/view.js b/js_v8/view.js index 6e22026..ce644dd 100644 --- a/js_v8/view.js +++ b/js_v8/view.js @@ -98,14 +98,14 @@ function toggleClass(element, active) { function showText(text) { var messages = { 'paused': "
Paused

Press p to resume
", - 'pausedMobile': "
Paused

Press to resume
Don't like ads? Want to support the developer? Tap for the ad-free version.
", + 'pausedAndroid': "
Paused

Press to resume
Don't like ads? Want to support the developer? Tap for the ad-free version.
", 'start': "
Press enter to start
", 'gameover': "
Game Over: " + score + " pts

High Scores:
" }; if (text == 'paused') { - if (settings.platform == 'mobile') { - text = 'pausedMobile'; + if (settings.os == 'android') { + text = 'pausedAndroid'; } }