fix(studio): mainMenu.show подхватывает opts.onPlay/onShow/onHide (порт)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ba90bf5c7d
commit
e477d652f6
@ -2593,6 +2593,10 @@ const game = {
|
|||||||
opts = opts && typeof opts === 'object' ? opts : {};
|
opts = opts && typeof opts === 'object' ? opts : {};
|
||||||
this._opts = opts;
|
this._opts = opts;
|
||||||
this._active = true;
|
this._active = true;
|
||||||
|
// Колбэки можно передавать прямо в опциях show({ onPlay, onShow, onHide }).
|
||||||
|
if (typeof opts.onPlay === 'function') this._onPlay.push(opts.onPlay);
|
||||||
|
if (typeof opts.onShow === 'function') this._onShow.push(opts.onShow);
|
||||||
|
if (typeof opts.onHide === 'function') this._onHide.push(opts.onHide);
|
||||||
// 1) Заблокировать управление игроком (наблюдатель).
|
// 1) Заблокировать управление игроком (наблюдатель).
|
||||||
_send('player.setInputBlocked', { blocked: true });
|
_send('player.setInputBlocked', { blocked: true });
|
||||||
game.hud.setVisible(false);
|
game.hud.setVisible(false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user