This repository has been archived by the owner on Apr 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Lobby Values
paige edited this page Sep 11, 2023
·
3 revisions
Lobbies have two main value things those being lobby values and starter player values
Values for lobbies that are created when the lobby is created or by using new lobby.Value()
let lobby = new game.Lobby(ctx, {
values: {
score: 0
}
});
console.log(lobby.score); // 0
description: creates a new lobby value
parameters:
- name
String
: name of the value- content
Any
: content of the valuelet lobby = new game.Lobby(ctx); new lobby.Value("score", 0); console.log(lobby.score); // 0
Values for lobbies that are created when the instance is created or by using new inst.StarterLobbyValue()
Starter lobby values are automatically applied onto every newly created lobby
let game = new Pangine("game", {
starterLobbyValues: {
score: 0
}
});
let lobby = new game.Lobby(ctx);
console.log(lobby.score); // 0
description: creates a new starter lobby value
parameters:
- name
String
: name of the value- content
Any
: content of the valuelet game = new Pangine("game"); new game.StarterLobbyValue("score", 0); let lobby = new game.Lobby(ctx); console.log(lobby.score); // 0
If you want to check out the different versions and changes check out the releases
For a look into the development side check out the src folder