Hi,
I’m this tutorial for create my multiplayer game, in order to learn typescript correctly. I transcribe JS to TS, when i need to add the playeId it tells me it doesn’t exist … how to add it?
My code :
createOtherPlayer(playerInfo:any, platform:any){
const otherPlayer = this.physics.add.sprite(playerInfo.x, playerInfo.y, ‘dude’);
otherPlayer.playerId = playerInfo.playerId;
this.otherPlayers.add(otherPlayer);
otherPlayer.setBounce(0.2);
otherPlayer.setCollideWorldBounds(true);
this.physics.add.collider(otherPlayer, platform)
}
Thx