Add: php server files for timer

This commit is contained in:
2018-12-13 00:36:48 +09:00
parent edbd4743af
commit 537b0c1db1
10 changed files with 374 additions and 88 deletions
+43
View File
@@ -420,6 +420,49 @@ DBConnectManager.prototype.requestLicenseTimeData = function(maestroID, playerID
); );
} }
DBConnectManager.prototype.updateLicenseStartTime = function(maestroID, playerID, startTime, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/license_timer/update_license_start_time.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
var replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send(
"MaestroID=" + maestroID
+ "&PlayerID=" + playerID
+ "&StartTime=" + startTime
);
}
DBConnectManager.prototype.updateLicenseLeftTime = function(maestroID, playerID, leftTime, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/license_timer/update_license_left_time.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
var replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send(
"MaestroID=" + maestroID
+ "&PlayerID=" + playerID
+ "&LeftTime=" + leftTime
);
}
DBConnectManager.prototype.loadTempPlayerHistory = function(historyRecordManager) { DBConnectManager.prototype.loadTempPlayerHistory = function(historyRecordManager) {
historyRecordManager.push(new HistoryRecord("05/14", "space_invaders", 14460)); historyRecordManager.push(new HistoryRecord("05/14", "space_invaders", 14460));
+2
View File
@@ -1,4 +1,6 @@
function Chart() { function Chart() {
this.dbConnectManager = new DBConnectManager();
this.chartGraphics = game.add.graphics(0, 0); this.chartGraphics = game.add.graphics(0, 0);
this.printChartTitle(); this.printChartTitle();
this.printChartBaseLine(); this.printChartBaseLine();
+1 -1
View File
@@ -27,7 +27,7 @@ var LicenseTimer = {
this.chart = new Chart(); this.chart = new Chart();
this.chart.printContents(); this.chart.printContents();
this.inputScore = new InputScore(this.chart); this.inputScore = new InputScore(this.timer, this.chart);
}, },
back: function() { back: function() {
+8 -16
View File
@@ -1,4 +1,5 @@
function InputScore(chart) { function InputScore(timer, chart) {
this.timer = timer;
this.chart = chart; this.chart = chart;
this.licenseDataManager = new LicenseDataManager(); this.licenseDataManager = new LicenseDataManager();
@@ -64,7 +65,6 @@ function InputScore(chart) {
(function() { this.onClickSendToServerButton(); }).bind(this) (function() { this.onClickSendToServerButton(); }).bind(this)
); );
// this.loadLicenseCompanySubjectData();
this.makeCompanyPanel(); this.makeCompanyPanel();
this.makeSubjectPanel(); this.makeSubjectPanel();
this.setVisibleCompanyPanel(false); this.setVisibleCompanyPanel(false);
@@ -195,8 +195,8 @@ InputScore.prototype.makeSubjectPanel = function() {
setting.width = InputScore.SUBJECT_BUTTON_WIDTH; setting.width = InputScore.SUBJECT_BUTTON_WIDTH;
var subjectData = this.licenseDataManager.getSubjectDataByIndex(i); var subjectData = this.licenseDataManager.getSubjectDataByIndex(i);
var subjectData = subjectData.companyName + " " + subjectData.subjectName; var subjectName = subjectData.companyName + " " + subjectData.subjectName;
this.licenseSubjectButtonList[i] = new RoundRectButton(setting, null, subjectData, null); this.licenseSubjectButtonList[i] = new RoundRectButton(setting, null, subjectName, null);
} }
} }
@@ -265,6 +265,9 @@ InputScore.prototype.setVisibleSubjectPanel = function(flag, companyName) {
InputScore.prototype.onClickCompanySubjectButton = function(subjectFullname) { InputScore.prototype.onClickCompanySubjectButton = function(subjectFullname) {
this.setSubjectFullname(subjectFullname); this.setSubjectFullname(subjectFullname);
this.selectedSubjectData = this.licenseDataManager.getSubjectDataByName(subjectFullname); this.selectedSubjectData = this.licenseDataManager.getSubjectDataByName(subjectFullname);
// console.log(this.selectedSubjectData);
this.timer.setStartTime(this.selectedSubjectData.timeLimit * Timer.TIME_SECONDS_FOR_MINUTE);
} }
@@ -300,15 +303,4 @@ InputScore.SUBJECT_BUTTON_WIDTH = 260;
InputScore.BUTTON_GAP_WIDTH = 10; InputScore.BUTTON_GAP_WIDTH = 10;
InputScore.BUTTON_GAP_HEIGHT = 64; InputScore.BUTTON_GAP_HEIGHT = 64;
InputScore.SUBJECT_BUTTON_MAX_COUNT = 6; InputScore.SUBJECT_BUTTON_MAX_COUNT = 6;
/*
function LicenseCompanySubjectData(companyName, subjectName, timeLimit, maxScore, gradeList) {
this.companyName = companyName;
this.subjectName = subjectName;
this.timeLimit = timeLimit;
this.maxScore = maxScore;
this.gradeList = gradeList;
}
*/
+2 -2
View File
@@ -80,7 +80,7 @@ var Loading = {
// return; // return;
// } // }
// this.state.start('Login'); this.state.start('Login');
this.state.start('LicenseTimer'); // this.state.start('LicenseTimer');
}, },
} }
+135 -69
View File
@@ -1,6 +1,8 @@
function Timer() { function Timer() {
this.initVariables(); this.initVariables();
this.dbConnectManager = new DBConnectManager();
// bar // bar
var bar = game.add.graphics(); var bar = game.add.graphics();
bar.beginFill(0x202020); bar.beginFill(0x202020);
@@ -24,8 +26,8 @@ Timer.prototype.initVariables = function() {
this.isTimerGoingOn = false; this.isTimerGoingOn = false;
this.isTimeOver = false; this.isTimeOver = false;
this.timeStart = 0 this.startTime = 0
this.timeLeft = 0; this.leftTime = 0;
this.timerEvent = null; this.timerEvent = null;
this.prevTime = null; this.prevTime = null;
@@ -44,16 +46,36 @@ Timer.prototype.initVariables = function() {
} }
Timer.prototype.loadDataFromServer = function() { Timer.prototype.loadDataFromServer = function() {
this.timeStart = Timer.TIME_DEFAULT_SEC; this.dbConnectManager.requestLicenseTimeData(
this.timeLeft = Timer.TIME_DEFAULT_SEC; sessionStorageManager.getMaestroID(),
this.updateTimeText(); sessionStorageManager.getPlayerID(),
Timer.TIME_DEFAULT_SEC,
(function(replyJson) {
console.log(replyJson);
// if( there is saved time record) { if(replyJson.leftTime == null || replyJson.leftTime == 0) {
// this.isTimerGoingOn = false; this.startTime = replyJson.startTime;
// this.setTimerTextColor(0xffffff); this.leftTime = replyJson.timeStart;
// } this.resetTimer();
// else return;
this.setTimerTextColor(Timer.TEXT_COLOR_CYAN); }
// this.setTimerTextColor(Timer.TEXT_COLOR_CYAN);
// this.updateTimeText();
this.startTime = replyJson.startTime;
this.leftTime = replyJson.leftTime;
this.pauseTimer();
}).bind(this),
(function(replyJson) {
console.log(replyJson);
this.startTime = Timer.TIME_DEFAULT_SEC;
this.leftTime = this.startTime;
this.updateTimeText();
})
);
} }
Timer.prototype.makeTimer = function() { Timer.prototype.makeTimer = function() {
@@ -129,7 +151,10 @@ Timer.prototype.makeResetButton = function() {
return new RoundRectButton( return new RoundRectButton(
setting, setting,
null, "C", null, "C",
(function() { this.resetTimer(); }).bind(this) (function() {
this.resetTimer();
this.resetLeftTimeToServer();
}).bind(this)
); );
} }
@@ -205,7 +230,10 @@ Timer.prototype.makePauseButton = function() {
return new RoundRectButton( return new RoundRectButton(
setting, setting,
null, "∥", null, "∥",
(function() { this.pauseTimer(); }).bind(this) (function() {
this.updateLeftTimeToServer();
this.pauseTimer();
}).bind(this)
); );
} }
@@ -252,16 +280,16 @@ Timer.prototype.setTimerTextColor = function(color) {
Timer.prototype.startTimer = function() { Timer.prototype.startTimer = function() {
this.isTimerGoingOn = true; this.isTimerGoingOn = true;
if(this.timeLeft < 0) if(this.leftTime < 0)
this.setTimerTextColor(Timer.TEXT_COLOR_RED); this.setTimerTextColor(Timer.TEXT_COLOR_RED);
else else
this.setTimerTextColor(Timer.TEXT_COLOR_YELLOW); this.setTimerTextColor(Timer.TEXT_COLOR_YELLOW);
this.updateTimeText(); this.updateTimeText();
ShowNotifyTimeOver(this.timeLeft * Timer.TIME_MILLISECONDS); ShowNotifyTimeOver(this.leftTime * Timer.TIME_MILLISECONDS);
this.prevTime = this.getNowTime(); this.prevTime = this.getNowTime();
this.timerEvent = game.time.events.loop(1000, this.tickTimeLeft, this); this.timerEvent = game.time.events.loop(1000, this.tickLeftTime, this);
this.showButton(this.playButton, false); this.showButton(this.playButton, false);
this.showButton(this.pauseButton, true); this.showButton(this.pauseButton, true);
@@ -281,12 +309,14 @@ Timer.prototype.pauseTimer = function() {
this.showButton(this.playButton, true); this.showButton(this.playButton, true);
this.showButton(this.pauseButton, false); this.showButton(this.pauseButton, false);
this.showTimerButtons(); this.showTimerButtons();
// this.updateLeftTimeToServer();
} }
Timer.prototype.resetTimer = function() { Timer.prototype.resetTimer = function() {
this.isTimeOver = false; this.isTimeOver = false;
this.timeLeft = this.timeStart; this.leftTime = this.startTime;
this.pauseTimer(); this.pauseTimer();
this.isTimerGoingOn = false; this.isTimerGoingOn = false;
@@ -295,37 +325,32 @@ Timer.prototype.resetTimer = function() {
// this.loadDataFromServer(); // this.loadDataFromServer();
} }
Timer.prototype.tickTimeLeft = function() { Timer.prototype.tickLeftTime = function() {
this.timeLeft--; this.leftTime--;
var outFocusedTime = this.getOutFocusedTime(); var outFocusedTime = this.getOutFocusedTime();
if(outFocusedTime > 2) { if(outFocusedTime > 2) {
this.timeLeft -= outFocusedTime - 1; this.leftTime -= outFocusedTime - 1;
if(this.timeLeft > 0) { if(this.leftTime > 0) {
CancelNotifyTimeOver(); CancelNotifyTimeOver();
ShowNotifyTimeOver(this.timeLeft * Timer.TIME_MILLISECONDS); ShowNotifyTimeOver(this.leftTime * Timer.TIME_MILLISECONDS);
} }
} }
this.updateTimeText(); this.updateTimeText();
if(!this.isTimeOver && this.timeLeft < 0) if(!this.isTimeOver && this.leftTime < 0)
this.timeOver(); this.timeOver();
} }
Timer.prototype.timeOver = function() { Timer.prototype.timeOver = function() {
this.isTimeOver = true;
this.setTimerTextColor(Timer.TEXT_COLOR_RED);
console.log("time over"); console.log("time over");
// xhr = new XMLHttpRequest(); this.isTimeOver = true;
// xhr.open('POST', 'delete_last_timestamp.php', true); this.setTimerTextColor(Timer.TEXT_COLOR_RED);
// xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
// var param = 'UserID=' + playerUserID; this.resetLeftTimeToServer();
// xhr.send(param);
} }
Timer.prototype.getNowTime = function() { Timer.prototype.getNowTime = function() {
@@ -443,15 +468,18 @@ Timer.prototype.timePlus = function(timePlusSecond, type) {
} }
// console.log(timeAmount); // console.log(timeAmount);
this.timeLeft += timeAmount; this.leftTime += timeAmount;
var maxTime = 99 * Timer.TIME_MINUTES_FOR_HOUR * Timer.TIME_SECONDS_FOR_MINUTE * Timer.TIME_SECONDS_FOR_MINUTE; var maxTime = 99 * Timer.TIME_MINUTES_FOR_HOUR * Timer.TIME_SECONDS_FOR_MINUTE * Timer.TIME_SECONDS_FOR_MINUTE;
if(this.timeLeft > maxTime) if(this.leftTime > maxTime)
this.timeLeft = maxTime; this.leftTime = maxTime;
this.updateTimeText(); this.updateTimeText();
if(!this.isTimerGoingOn) if(!this.isTimerGoingOn) {
this.sendStartTimeToServer(this.timeLeft); this.startTime = this.leftTime;
this.sendTimeLeftToServer(); this.updateStartTimeToServer();
} else {
this.updateLeftTimeToServer();
}
} }
Timer.prototype.timeMinus = function(timeMinusSecond, type) { Timer.prototype.timeMinus = function(timeMinusSecond, type) {
@@ -467,37 +495,45 @@ Timer.prototype.timeMinus = function(timeMinusSecond, type) {
} }
// console.log(timeAmount); // console.log(timeAmount);
this.timeLeft -= timeAmount; this.leftTime -= timeAmount;
if(this.timeLeft < 0) if(this.leftTime < 0)
this.timeLeft = 0; this.leftTime = 0;
this.updateTimeText(); this.updateTimeText();
if(!this.isTimerGoingOn) if(!this.isTimerGoingOn) {
this.sendStartTimeToServer(this.timeLeft); this.startTime = this.leftTime;
this.sendTimeLeftToServer(); this.updateStartTimeToServer();
} else {
this.updateLeftTimeToServer();
}
} }
Timer.prototype.setTime =function(sec) { Timer.prototype.setTime =function(timeSecond) {
// console.log("time up : " + min); this.leftTime = timeSecond;
this.timeLeft += sec;
this.updateTimeText(); this.updateTimeText();
if(!this.isTimerGoingOn) {
this.startTime = this.leftTime;
this.updateStartTimeToServer();
} else {
this.updateLeftTimeToServer();
}
} }
Timer.prototype.updateTimeText = function() { Timer.prototype.updateTimeText = function() {
var secondsForHour = Timer.TIME_MINUTES_FOR_HOUR * Timer.TIME_SECONDS_FOR_MINUTE; var secondsForHour = Timer.TIME_MINUTES_FOR_HOUR * Timer.TIME_SECONDS_FOR_MINUTE;
var timeLeftHour = parseInt(this.timeLeft / secondsForHour); var leftTimeHour = parseInt(this.leftTime / secondsForHour);
var timeLeftMinute = parseInt((this.timeLeft % secondsForHour) / Timer.TIME_SECONDS_FOR_MINUTE); var leftTimeMinute = parseInt((this.leftTime % secondsForHour) / Timer.TIME_SECONDS_FOR_MINUTE);
var timeLeftSecond = this.timeLeft % Timer.TIME_SECONDS_FOR_MINUTE; var leftTimeSecond = this.leftTime % Timer.TIME_SECONDS_FOR_MINUTE;
this.timeHourText.text = this.getTimeWithTimeFormat(timeLeftHour, Timer.TYPE_HOUR); this.timeHourText.text = this.getTimeWithTimeFormat(leftTimeHour, Timer.TYPE_HOUR);
// console.log(this.timeLeft); // console.log(this.leftTime);
// console.log(this.timeHourText.text); // console.log(this.timeHourText.text);
this.timeMinuteText.text = this.getTimeWithTimeFormat(timeLeftMinute, Timer.TYPE_MINUTE); this.timeMinuteText.text = this.getTimeWithTimeFormat(leftTimeMinute, Timer.TYPE_MINUTE);
this.timeSecondText.text = this.getTimeWithTimeFormat(timeLeftSecond, Timer.TYPE_SECOND); this.timeSecondText.text = this.getTimeWithTimeFormat(leftTimeSecond, Timer.TYPE_SECOND);
// this.updateTimeVariables(); // this.updateTimeVariables();
// this.timerText.text = this.getTimeWithTimeFormat(); // this.timerText.text = this.getTimeWithTimeFormat();
} }
@@ -518,7 +554,7 @@ Timer.prototype.getTimeWithTimeFormat = function(timeValue, type) {
return this.getTwoDigitNumber(timeValue); return this.getTwoDigitNumber(timeValue);
} }
if(this.timeLeft < 0) { if(this.leftTime < 0) {
return "-" + this.getTwoDigitNumber(timeValue); return "-" + this.getTwoDigitNumber(timeValue);
} else { } else {
return this.getTwoDigitNumber(timeValue); return this.getTwoDigitNumber(timeValue);
@@ -526,25 +562,55 @@ Timer.prototype.getTimeWithTimeFormat = function(timeValue, type) {
} }
Timer.prototype.setStartTime = function(time) {
this.startTime = time;
Timer.prototype.sendStartTimeToServer = function(time) { if(!this.isTimerGoingOn) {
this.timeStart = time; this.leftTime = this.startTime;
this.updateTimeText();
}
// send to server this.updateStartTimeToServer();
console.log("send to server : " + this.timeStart);
} }
Timer.prototype.sendTimeLeftToServer = function() {
return;
// console.log(this.timeLeft);
// console.log(playerUserID);
xhr = new XMLHttpRequest();
xhr.open('POST', 'make_last_timestamp.php', true); Timer.prototype.updateStartTimeToServer = function() {
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); // send to server
var param = 'UserID=' + playerUserID + '&Time=' + this.timeLeft; console.log("send start time to server : " + this.startTime);
xhr.send(param);
this.dbConnectManager.updateLicenseStartTime(
sessionStorageManager.getMaestroID(),
sessionStorageManager.getPlayerID(),
this.startTime,
(function(replyJson) { console.log(replyJson); }).bind(this),
(function(replyJson) { console.log(replyJson); })
);
}
Timer.prototype.resetLeftTimeToServer = function() {
console.log("send left time to server : " + this.leftTime);
this.dbConnectManager.updateLicenseLeftTime(
sessionStorageManager.getMaestroID(),
sessionStorageManager.getPlayerID(),
0,
(function(replyJson) { console.log(replyJson); }).bind(this),
(function(replyJson) { console.log(replyJson); })
);
},
Timer.prototype.updateLeftTimeToServer = function() {
console.log("send left time to server : " + this.leftTime);
this.dbConnectManager.updateLicenseLeftTime(
sessionStorageManager.getMaestroID(),
sessionStorageManager.getPlayerID(),
this.leftTime,
(function(replyJson) { console.log(replyJson); }).bind(this),
(function(replyJson) { console.log(replyJson); })
);
}, },
@@ -0,0 +1,78 @@
<?php
header("Content-Type: application/json");
$maestro_id = $_POST["MaestroID"];
$player_id = $_POST["PlayerID"];
$default_start_time = $_POST["DefaultStartTime"];
// echo $maestro_id." / ".$player_id;
// if($default_start_time === null)
// $default_start_time = 60 * 60; // 60 min * 60 sec
include "./../lib/send_reply_json.php";
include "./../setup/connect_db.php";
$start_time = $default_start_time;
$left_time = null;
$saved_date_time = null;
// get license_time data
$time_data = get_time_data($maestro_id, $player_id);
// set_data("timeData", $time_data);
// if license_time data is not exist
// then make new license_time data
if($time_data["StartTime"] == null) {
insert_default_time_data($maestro_id, $player_id, $default_start_time);
$start_time = $default_start_time;
} else {
$start_time = $time_data["StartTime"];
$left_time = $time_data["LeftTime"];
$saved_date_time = $time_data["SavedDateTime"];
}
// send license_time data back to client
set_data("startTime", $start_time);
set_data("leftTime", $left_time);
set_data("savedDateTime", $saved_date_time);
send_result_success();
exit;
function get_time_data($maestro_id, $player_id) {
global $db_conn;
$query = "
SELECT StartTime, LeftTime, SavedDateTime
FROM license_time
WHERE MaestroID = ? AND PlayerID = ?
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param("ii", $maestro_id, $player_id);
$stmt->execute();
$stmt->bind_result($start_time, $left_time, $saved_date_time);
$stmt->fetch();
$stmt->close();
$license_time["StartTime"] = $start_time;
$license_time["LeftTime"] = $left_time;
$license_time["SavedDateTime"] = $saved_date_time;
return $license_time;
}
function insert_default_time_data($maestro_id, $player_id, $default_start_time) {
global $db_conn;
$query = "
INSERT INTO license_time (MaestroID, PlayerID, StartTime)
VALUES (?, ?, ?);
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param("iii", $maestro_id, $player_id, $default_start_time);
$stmt->execute();
}
?>
@@ -0,0 +1,49 @@
<?php
header('Content-Type: application/json');
$maestro_id = $_POST["MaestroID"];
$player_id = $_POST["PlayerID"];
$left_time = $_POST["LeftTime"];
// echo $maestro_id." / ".$player_id;
include "./../lib/send_reply_json.php";
include "./../setup/connect_db.php";
if($left_time == 0)
reset_left_time($maestro_id, $player_id);
else
update_left_time($maestro_id, $player_id, $left_time);
send_result_success();
exit;
function reset_left_time($maestro_id, $player_id) {
global $db_conn;
$query = "
UPDATE license_time
SET LeftTime = null, SavedDateTime = null
WHERE MaestroID = ? AND PlayerID = ?
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param('ii', $maestro_id, $player_id);
$stmt->execute();
}
function update_left_time($maestro_id, $player_id, $left_time) {
global $db_conn;
$query = "
UPDATE license_time
SET LeftTime = ?, SavedDateTime = NOW()
WHERE MaestroID = ? AND PlayerID = ?
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param('iii', $left_time, $maestro_id, $player_id);
$stmt->execute();
}
?>
@@ -0,0 +1,33 @@
<?php
header('Content-Type: application/json');
$maestro_id = $_POST["MaestroID"];
$player_id = $_POST["PlayerID"];
$start_time = $_POST["StartTime"];
// echo $maestro_id." / ".$player_id;
include "./../lib/send_reply_json.php";
include "./../setup/connect_db.php";
update_start_time($maestro_id, $player_id, $start_time);
send_result_success();
exit;
function update_start_time($maestro_id, $player_id, $start_time) {
global $db_conn;
$query = "
UPDATE license_time
SET StartTime = ?
WHERE MaestroID = ? AND PlayerID = ?
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param('iii', $start_time, $maestro_id, $player_id);
$stmt->execute();
}
?>
+23
View File
@@ -0,0 +1,23 @@
CREATE TABLE license_time (
LicenseTimeID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
MaestroID INT UNSIGNED NOT NULL,
PlayerID INT UNSIGNED NOT NULL,
StartTime INT UNSIGNED NOT NULL,
LeftTime INT NOT NULL,
SavedDateTime DATETIME NOT NULL,
FOREIGN KEY (MaestroID) REFERENCES maestro(MaestroID),
FOREIGN KEY (PlayerID) REFERENCES player(PlayerID)
);
CREATE TABLE license_score (
LicenseScoreID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
MaestroID INT UNSIGNED NOT NULL,
PlayerID INT UNSIGNED NOT NULL,
SubjectName CHAR(50) NOT NULL,
Score INT UNSIGNED NOT NULL,
ScoreDateTime DATETIME NOT NULL,
FOREIGN KEY (MaestroID) REFERENCES maestro(MaestroID),
FOREIGN KEY (PlayerID) REFERENCES player(PlayerID)
);