fix(player): game.self.setColor (порт)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
8cc608ca2a
commit
fd1d6c7fdb
@ -690,6 +690,13 @@ function _buildSelfApi() {
|
|||||||
const id = _target.id ?? _target.ref;
|
const id = _target.id ?? _target.ref;
|
||||||
_send('scene.setCollide', { kind: k, id, ref: (k && id != null) ? (k + ':' + id) : undefined, canCollide: !!can });
|
_send('scene.setCollide', { kind: k, id, ref: (k && id != null) ? (k + ':' + id) : undefined, canCollide: !!can });
|
||||||
},
|
},
|
||||||
|
/** Перекрасить объект-носитель (только примитив). */
|
||||||
|
setColor(hex) {
|
||||||
|
if (typeof hex !== 'string') return;
|
||||||
|
const k = _target.kind;
|
||||||
|
const id = _target.id ?? _target.ref;
|
||||||
|
_send('scene.setColor', { kind: k, id, ref: (k && id != null) ? (k + ':' + id) : undefined, color: hex });
|
||||||
|
},
|
||||||
delete() {
|
delete() {
|
||||||
_send('self.delete', { target: _target });
|
_send('self.delete', { target: _target });
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user