[add] Engine

This commit is contained in:
2022-08-26 16:48:17 +08:00
parent f67e566f2a
commit d9c19f096c
197 changed files with 10626 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import ScreenResize from "../ScreenResize";
const { ccclass, property } = cc._decorator;
@ccclass("SwitchActive")
export class SwitchActive {
@property({ type: cc.Node })
public UI: cc.Node = null;
@property({ type: cc.Boolean/*, visible: function (this: ImageGroup) { return this.Reset; } */ })
public show: boolean[] = [];
public SetObjActive(obj: cc.Node, show: boolean): void {
obj.active = show;
}
}
@ccclass
export default class SwitchActiveGroup extends cc.Component {
@property({ displayName: "縮放scale群組", type: SwitchActive })
public ScaleGroups: SwitchActive[] = [];
public Run(): void {
if (this.ScaleGroups != null && this.ScaleGroups.length) {
for (let group of this.ScaleGroups) {
group.SetObjActive(group.UI, group.show[ScreenResize.IsPortrait]);
}
}
}
}