This commit is contained in:
2024-09-27 16:07:56 +08:00
parent 027f527865
commit 2a88532ef4
12 changed files with 3422 additions and 2870 deletions

View File

@@ -1,4 +1,4 @@
import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,resources,Sprite,SpriteAtlas,v3 } from "cc";
import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,resources,Sprite,SpriteAtlas,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";
@@ -16,7 +16,6 @@ const { ccclass, property } = _decorator;
@ccclass('CardControllerComp')
@ecs.register('CardController', false)
export class CardControllerComp extends CCComp {
card_level:number = 1;
in_load:boolean = false
touch_time:number = 0
@@ -41,15 +40,9 @@ export class CardControllerComp extends CCComp {
// oops.message.on("do_reward", this.do_reward, this)
oops.message.on("minssion_victory", this.do_minssion_victory, this)
oops.message.on("minssion_defeat", this.do_minssion_defeat, this)
}
start() {
}
show_info(uuid:number,type:number){
// console.log("show_info",uuid)
let node =this.node.getChildByName("item_box")
@@ -202,8 +195,8 @@ export class CardControllerComp extends CCComp {
}
to_mission(){
this.node.getChildByName("mission_home").active=true
this.node.getChildByName("hero").active=false
this.node.getChildByName("home").active=false
this.node.getChildByName("hero_home").active=false
this.node.getChildByName("shop_home").active=false
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=true
this.node.getChildByName("bar").getChildByName("hero_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=false
@@ -213,8 +206,8 @@ export class CardControllerComp extends CCComp {
}
to_home(){
this.node.getChildByName("mission_home").active=false
this.node.getChildByName("hero").active=false
this.node.getChildByName("home").active=true
this.node.getChildByName("hero_home").active=false
this.node.getChildByName("shop_home").active=true
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("hero_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=true
@@ -224,8 +217,8 @@ export class CardControllerComp extends CCComp {
}
to_hero(){
this.node.getChildByName("mission_home").active=false
this.node.getChildByName("hero").active=true
this.node.getChildByName("home").active=false
this.node.getChildByName("hero_home").active=true
this.node.getChildByName("shop_home").active=false
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("hero_btn").getChildByName("bg").active=true
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=false