Fix: RecordUtil.getRecordValueWithUnit

This commit is contained in:
2018-12-03 01:14:10 +09:00
parent eb61871526
commit 123a715bac
15 changed files with 19 additions and 8 deletions
+2 -1
View File
@@ -23,7 +23,8 @@ Chart.prototype.drawRecordGraph = function(index, date, bestRecord, min, max) {
this.drawText(
posX, posY - Chart.CHART_HEIGHT - Chart.CHART_RECORD_OFFSET_Y,
StringUtil.getRecordTextWithoutUnit(bestRecord) + StringUtil.getScoreUnit(sessionStorageManager.playingAppID)
// StringUtil.getRecordTextWithoutUnit(bestRecord) + StringUtil.getScoreUnit(sessionStorageManager.playingAppID)
RecordUtil.getRecordValueWithUnit(bestRecord, sessionStorageManager.getPlayingAppID())
);
// chart
+1 -1
View File
@@ -12,7 +12,7 @@ RecordUtil.getRecordValueText = function(record, appID) {
if(appID == 104)
return record.toFixed(2);
else
NumberUtil.numberWithCommas(Math.floor(record));
return NumberUtil.numberWithCommas(Math.floor(record));
}
RecordUtil.getRecordUnit = function(appID) {
+1 -1
View File
@@ -181,7 +181,7 @@ Missile.prototype.speedUp = function() {
Missile.DEFAULT_SPEED_DOT_PER_SEC = 150;
Missile.START_Radius_PX = 600;
Missile.START_Radius_PX = 640;
Missile.START_RANDOM_Radius_PERCENT = 40;
Missile.SPACESHIP_RANDOM_AREA_MARGIN = 100;
+4 -2
View File
@@ -7,6 +7,7 @@ function StopWatch() {
this.timerText = game.add.text(game.world.centerX, 35, "", fontStyle);
this.timerText.anchor.set(0.5);
this.printTime();
// var grd = this.label.context.createLinearGradient(0, 0, 0, StopWatch.FONT_HEIGHT_PX);
// grd.addColorStop(0, '#8ED6FF');
@@ -57,8 +58,9 @@ StopWatch.prototype.updateTimer = function() {
}
StopWatch.prototype.printTime = function() {
var timeText = this.ellpasedTime.toFixed(2);
this.timerText.text = timeText + "초";
this.timerText.text = RecordUtil.getRecordValueWithUnit(
this.ellpasedTime, sessionStorageManager.getPlayingAppID()
);
}
StopWatch.prototype.removeTimer = function() {
+1 -1
View File
@@ -50,7 +50,7 @@ var Start = {
// bottom ui
var screenBottomUI = new ScreenBottomUI();
screenBottomUI.printLeftText("");
screenBottomUI.printLeftTextWithAppHighestRecord(sessionStorageManager.getAppHighestRecord());
screenBottomUI.printCenterText(sessionStorageManager.getPlayingAppKoreanName());
screenBottomUI.printRightText(sessionStorageManager.getPlayerName());
+1
View File
@@ -41,6 +41,7 @@
<!-- library source files -->
<script src="../../game/lib/keyboard_shortcut.js"></script>
<script src="../../game/lib/number_util.js"></script>
<script src="../../game/lib/record_util.js"></script>
<script src="../../game/lib/history_record_manager.js"></script>
<script src="../../game/lib/input_type_text.js"></script>
<script src="../../game/lib/score_board.js"></script>
+1
View File
@@ -41,6 +41,7 @@
<!-- library source files -->
<script src="../../game/lib/keyboard_shortcut.js"></script>
<script src="../../game/lib/number_util.js"></script>
<script src="../../game/lib/record_util.js"></script>
<script src="../../game/lib/history_record_manager.js"></script>
<script src="../../game/lib/input_type_text.js"></script>
<script src="../../game/lib/score_board.js"></script>
+1
View File
@@ -41,6 +41,7 @@
<!-- library source files -->
<script src="../../game/lib/keyboard_shortcut.js"></script>
<script src="../../game/lib/number_util.js"></script>
<script src="../../game/lib/record_util.js"></script>
<script src="../../game/lib/history_record_manager.js"></script>
<script src="../../game/lib/input_type_text.js"></script>
<script src="../../game/lib/score_board.js"></script>
+1
View File
@@ -41,6 +41,7 @@
<!-- library source files -->
<script src="../../game/lib/keyboard_shortcut.js"></script>
<script src="../../game/lib/number_util.js"></script>
<script src="../../game/lib/record_util.js"></script>
<script src="../../game/lib/history_record_manager.js"></script>
<script src="../../game/lib/input_type_text.js"></script>
<script src="../../game/lib/score_board.js"></script>
+1
View File
@@ -20,6 +20,7 @@
<script src="../../game/lib/keyboard_shortcut.js"></script>
<script src="../../game/lib/number_util.js"></script>
<script src="../../game/lib/string_util.js"></script>
<script src="../../game/lib/record_util.js"></script>
<script src="../../game/lib/date_util.js"></script>
<script src="../../game/lib/history_record_manager.js"></script>
<script src="../../game/lib/db_connect_manager.js"></script>
+1
View File
@@ -42,6 +42,7 @@
<!-- <script src="../../game/lib/keyboard_shortcut.js"></script> -->
<script src="../../game/lib/string_util.js"></script>
<script src="../../game/lib/number_util.js"></script>
<script src="../../game/lib/record_util.js"></script>
<script src="../../game/lib/history_record_manager.js"></script>
<script src="../../game/lib/input_type_text.js"></script>
<script src="../../game/lib/button/round_rect_button.js"></script>
+1
View File
@@ -42,6 +42,7 @@
<script src="../../game/lib/keyboard_shortcut.js"></script>
<script src="../../game/lib/string_util.js"></script>
<script src="../../game/lib/number_util.js"></script>
<script src="../../game/lib/record_util.js"></script>
<script src="../../game/lib/history_record_manager.js"></script>
<script src="../../game/lib/input_type_text.js"></script>
<script src="../../game/lib/button/round_rect_button.js"></script>
+1
View File
@@ -42,6 +42,7 @@
<!-- <script src="../../game/lib/keyboard_shortcut.js"></script> -->
<script src="../../game/lib/string_util.js"></script>
<script src="../../game/lib/number_util.js"></script>
<script src="../../game/lib/record_util.js"></script>
<script src="../../game/lib/history_record_manager.js"></script>
<script src="../../game/lib/input_type_text.js"></script>
<script src="../../game/lib/button/round_rect_button.js"></script>
+1 -1
View File
@@ -4,7 +4,7 @@ function get_app_highest_record($maestro_id, $app_id, $player_id) {
global $db_conn;
$query = "
SELECT HighestRecord
SELECT MAX(HighestRecord)
FROM app_highest_record
WHERE MaestroID = ? AND AppID = ? AND PlayerID = ?;
";
@@ -31,7 +31,7 @@ if($prev_best_record_id === null || $prev_best_record_id < 0) {
// highest record is the highest record
$app_highest_record = get_app_highest_record($maestro_id, $app_id, $player_id);
// echo "\napp_highest_record : $app_highest_record";
echo "\napp_highest_record : $app_highest_record";
// echo "\nrecord : $record";
if($app_highest_record == null) {