123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import { _decorator, Node, tween, Quat, Vec3 } from 'cc';
- import { BaseView } from '../../framework/layer/BaseView';
- const { ccclass, property } = _decorator;
- @ccclass('Tips')
- export class Tips extends BaseView {
- protected onLoad() {
- super.onLoad();
- tween(this.node)
- .to(0.5,{eulerAngles:new Vec3(this.node.eulerAngles.x,this.node.eulerAngles.y,60),scale:new Vec3(this.node.scale.x-0.2,this.node.scale.y-0.2)})
- .to(0.5,{eulerAngles:new Vec3(this.node.eulerAngles.x,this.node.eulerAngles.y,0),scale:new Vec3(this.node.scale.x,this.node.scale.y)})
- .union()
- .repeatForever()
- .start()
- }
- protected onDestroy() {
- }
- //UI开打时会调用,如果有初始化代码应该放到此函数
- onOpen() {
-
- }
- //UI关闭时会调用,该函数在onDestroy前调用
- onClose() {
- }
- //框架管理UI层级时会调用,可根据UI情况修改
- onShow() {
- super.onShow();
- }
- //框架管理UI层级时会调用,可根据UI情况修改
- onHide() {
- super.onHide();
- }
- //UI事件处理
- private onTouchButton(event: Event) {
- //Framework.audio.playEffect(AudioID.Click);
- let target: any = event.target;
- }
- }
|