yantar/assets/Scripts/ux/switchWalls.ts
2025-02-05 18:03:29 +07:00

16 lines
360 B
TypeScript

import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('switchWalls')
export class switchWalls extends Component {
@property(Node) Walls : Node = null!;
isOnToggle: boolean = true;
wallSwitch() {
if (this.isOnToggle) {
this.Walls.active = !this.Walls.active ;
}
}
}