|
|
|
รบกวนช่วยแนะนำ การส่งค่า object javascript มายัง php หน่อยครับ ผมต้องการส่ง endState มายัง php ครับ |
|
|
|
|
|
|
|
<script>
var endState = {
create: function() {
this.txt = game.add.text(w/2, -150, 'WAR', { font: '50px Arial', fill: '#fff' });
this.txt.anchor.setTo(0.5);
game.add.tween(this.txt).to({ y: h/2-80 }, 1000, Phaser.Easing.Bounce.Out).start();
this.scoreText = game.add.text(w/2, h/2-20, 'score: ' + score , { font: '92px Arial', fill: '#fff' });
var score = game.add.text;
this.scoreText.anchor.setTo(0.5);
this.scoreText.alpha = 0;
game.add.tween(this.scoreText).delay(500).to({ alpha: 1}, 1000).start();
this.restartText = game.add.text(w/2, h/2, 'try', { font: '20px Arial', fill: '#fff' });
this.restartText.anchor.setTo(0.5);
this.restartText.alpha = 0;
game.add.tween(this.restartText).delay(500).to({ alpha: 1}, 1000).start();
game.add.tween(this.restartText).to({y: h/2+50}, 500).to({y: h/2+70}, 500).loop().start();
if (status == 0) {
this.txt.text = 'Lose!'
}
if (status == 1) {
this.txt.text = 'Win!'
}
},
update: function() {
if (game.input.keyboard.isDown(Phaser.Keyboard.ENTER)) {
game.state.start('play');
}
},
};
</script>
Tag : PHP, JavaScript
|
|
|
|
|
|
Date :
2017-06-11 13:12:51 |
By :
benze240 |
View :
662 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ใช้ application/json ครับ
jQuery กับ Ajax และ JSON ใช้ Serialize() ส่งค่า Form
|
|
|
|
|
Date :
2017-06-12 09:35:43 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|