fix(player): game.self.setVisible/setCollide (порт для китов Вики)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
c3260e0395
commit
8cc608ca2a
@ -678,6 +678,18 @@ function _buildSelfApi() {
|
|||||||
_send('scene.rotate', { kind: k, id, ref: (k && id != null) ? (k + ':' + id) : undefined, rotationY: r });
|
_send('scene.rotate', { kind: k, id, ref: (k && id != null) ? (k + ':' + id) : undefined, rotationY: r });
|
||||||
},
|
},
|
||||||
rotateY(ry) { this.rotate(ry); },
|
rotateY(ry) { this.rotate(ry); },
|
||||||
|
/** Показать/скрыть объект-носитель. */
|
||||||
|
setVisible(vis) {
|
||||||
|
const k = _target.kind;
|
||||||
|
const id = _target.id ?? _target.ref;
|
||||||
|
_send('scene.setVisible', { kind: k, id, ref: (k && id != null) ? (k + ':' + id) : undefined, visible: !!vis });
|
||||||
|
},
|
||||||
|
/** Включить/выключить столкновения объекта-носителя. */
|
||||||
|
setCollide(can) {
|
||||||
|
const k = _target.kind;
|
||||||
|
const id = _target.id ?? _target.ref;
|
||||||
|
_send('scene.setCollide', { kind: k, id, ref: (k && id != null) ? (k + ':' + id) : undefined, canCollide: !!can });
|
||||||
|
},
|
||||||
delete() {
|
delete() {
|
||||||
_send('self.delete', { target: _target });
|
_send('self.delete', { target: _target });
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user