| 12345678910111213141516171819 |
- import { _decorator, Component, Node, EditBox } from 'cc';
- import { ISJSB } from './data/jsb/platform';
- const { ccclass, property } = _decorator;
- @ccclass('GMInput')
- export class GMInput extends Component {
- onLoad() {
- if (ISJSB()) {
- this.node.active = false;
- }
- }
- public onOk(): void {
- let edit = this.node.getComponent(EditBox);
- globalThis.gm(edit.string);
- edit.string = "执行成功";
- }
- }
|