Navigation

  • Recent
  • Tags
  • Users
  • Search
  • Login
Colyseus
  • Login
  • Search
  • Recent
  • Tags
  • Users

Documentation GitHub

We're migrating to GitHub Discussions. This forum does not accept new registrations since April 6, 2023.
  1. Home
  2. Kai
  3. Posts
  • Profile
  • More
    • Continue chat with Kai
    • Flag Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

Posts made by Kai

RE: Private Schema variable? inside Player instead of State Schema?

it seams remove @type("number") to some variable makes it private over the network

posted in Questions & Help • 27 Nov 2019, 03:06
Private Schema variable? inside Player instead of State Schema?

export class Player extends Schema {
@type("number")
x = Math.floor(Math.random() * 400);
@type("number")
y = Math.floor(Math.random() * 400);
@type("number")
cx = 0;
@type("number")
cy = 0;
}

export class State extends Schema {
@type({
map: Player
})
players = new MapSchema < Player > ();

}

i want some of my variables not sent over client inisde player schema

posted in Questions & Help • 27 Nov 2019, 02:55

© 2023 Endel Dreyer