I have a game controller, there is a setPause
method and there is const statusPause = true / false
, how can I access const statusPause
from other files, services
, etc. To perform some checks depending on the state of the game? If you do this in any file, undefined
is returned instead of bool
.
let game = require('../controllers/game');
console.log(game.setPause.statusPause);
Aucun commentaire:
Enregistrer un commentaire