feat: group 1.0.0

This commit is contained in:
zzc
2026-05-12 06:46:31 +08:00
parent 493b4709bc
commit 2fc90c1219
55 changed files with 23561 additions and 1767 deletions

View File

@@ -0,0 +1,35 @@
import { _decorator, Component, Label, Node, tween, Vec3 } from "cc";
import { EventDispatcher } from "../libs/EventDispatcher";
const { ccclass, property } = _decorator;
@ccclass("TipControl")
export class TipControl extends Component {
//提示标签
@property(Label)
tipLabel: Label | null = null;
start() {
//默认位置,屏幕外
this.node.setPosition(0, -1000);
//监听tips msg事件
EventDispatcher.getTarget().on(
EventDispatcher.TIP_MSG,
this.showTips,
this,
);
}
//显示提示
showTips(msg: string) {
this.tipLabel.string = msg;
tween(this.node)
.to(0.2, { position: new Vec3(0, 0, 0) })
.delay(1)
.to(0.2, { position: new Vec3(0, 1000, 0) })
.call(() => {
this.node.setPosition(0, -1000);
})
.start();
}
update(deltaTime: number) {}
}