- 将游戏地平线从120调整为-215,以改变战斗场景基线 - 移除多线路怪物生成逻辑,统一使用地平线作为y坐标 - 清理卡牌系统中的等级升级相关代码,简化事件处理 - 更新角色控制器UI布局和样式,调整组件位置和尺寸 - 替换纹理图集资源,移除旧版背景图,添加新版分层背景 - 删除多个未使用的meta配置文件
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,resources,Sprite,SpriteAtlas,tween,UITransform,v3 } from "cc";
|
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
|
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
|
import { smc } from "../common/SingletonModuleComp";
|
|
const { ccclass, property } = _decorator;
|
|
|
|
/** 视图层对象 */
|
|
@ccclass('CardControllerComp')
|
|
@ecs.register('CardController', false)
|
|
export class CardControllerComp extends CCComp {
|
|
touch_time:number = 0
|
|
in_touch:boolean = false
|
|
bbg:any=null
|
|
bbg_y:number=40
|
|
bbg_x:any=[-300,-150,0,150,300]
|
|
protected onLoad(): void {
|
|
}
|
|
start() {
|
|
console.log("CardControllerComp start",this.node)
|
|
this.page_init()
|
|
}
|
|
onAdded(args:any){
|
|
console.log("CardControllerComp onAdded",args)
|
|
smc.map.MapView.scene.mapLayer.node.getChildByName("loading").active=false;
|
|
}
|
|
protected update(dt: number): void {
|
|
if(smc.vmdata.game_over||smc.vmdata.game_pause){
|
|
return
|
|
}
|
|
|
|
}
|
|
page_init(){
|
|
this.node.getChildByName("mission_home").active=true;
|
|
this.node.getChildByName("mission").active=false;
|
|
}
|
|
|
|
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
reset() {
|
|
this.node.destroy();
|
|
}
|
|
|
|
|
|
} |