- added function to get random number and card
This commit is contained in:
@@ -1,22 +1,9 @@
|
||||
const app = new PIXI.Application({
|
||||
autoResize: true,
|
||||
resolution: devicePixelRatio,
|
||||
backgroundColor: 0x0073db
|
||||
});
|
||||
document.getElementById('game').appendChild(app.view);
|
||||
function start_game() {
|
||||
socket.on('dice', function (data) {
|
||||
console.log(data);
|
||||
});
|
||||
|
||||
|
||||
// -------------------------------------- code --------------------------------------
|
||||
|
||||
// ------------------------------------ end code ------------------------------------
|
||||
|
||||
|
||||
// Resize (Do Not modify)
|
||||
window.addEventListener('resize', resize);
|
||||
|
||||
function resize() {
|
||||
let game = document.getElementById('game');
|
||||
app.renderer.resize(game.offsetWidth, game.offsetHeight);
|
||||
}
|
||||
|
||||
resize();
|
||||
socket.on('card', function (data) {
|
||||
console.log(data);
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user