Navigation

    Colyseus
    • Login
    • Search
    • Recent
    • Tags
    • Users
    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 •
    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 •