[READ-ONLY] Mirror of https://github.com/excaliburjs/sample-multiplayer-massive-realm. excaliburjs.com/sample-multiplayer-massive-realm/
excalibur excaliburjs sample
0

Configure Feed

Select the types of activity you want to include in your feed.

Add types

Erik Onarheim (May 5, 2024, 12:55 AM -0500) 4a87583b 18902c6e

+8 -1
+1 -1
massive-realm-configuration/readme.md
··· 21 21 22 22 ```javascript 23 23 if (!$connection.vars.model) { 24 - $connection.vars.model = $room.model('Player'); 24 + $connection.vars.model = $room.model('player'); // casing is important here 25 25 $connection.vars.model.id = $connection.id; 26 26 } 27 27
+6
src/network.ts
··· 87 87 this.mrClient.connect(true); 88 88 } 89 89 90 + updateType(player: Player) { 91 + if (!this.joined) return; 92 + 93 + this.mrClient.call('UpdateType', { type: player.type }); 94 + } 95 + 90 96 updatePosition(player: Player) { 91 97 if (!this.joined) return; 92 98
+1
src/player.ts
··· 3 3 4 4 5 5 export class Player extends Actor { 6 + public type = 0; 6 7 constructor(private network: Network) { 7 8 super({ 8 9 pos: vec(400, 400),