This commit is contained in:
pan@work
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

View File

@@ -0,0 +1,34 @@
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";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
import { SkillSet } from "../common/config/SkillSet";
import { HeroModelComp } from "../hero/HeroModelComp";
import { RewardSet } from "../common/config/RewardSet";
import { GameSet } from "../common/config/BoxSet";
import { GameMap } from "./GameMap";
import { MapModelComp } from "./model/MapModelComp";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('HeroHomeComp')
@ecs.register('HeroHome', false)
export class HeroHomeComp extends CCComp {
protected onLoad(): void {
}
start() {
let hero_talent_content=this.node.getChildByName("hero_talent").getChildByName("view").getChildByName("content").getComponent(UITransform)
hero_talent_content.height=2000
console.log("hero_home start")
}
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}

View File

@@ -0,0 +1 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"f830455e-1cb8-4379-b382-6de74c383166","files":[],"subMetas":{},"userData":{}}