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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "5423b9f8-8a8a-49a0-8ecb-0489dfcaba92",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "hero_home"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -19,8 +19,8 @@ const { ccclass, property } = _decorator;
@ccclass('Main') @ccclass('Main')
export class Main extends Root { export class Main extends Root {
start() { start() {
if (DEBUG) profiler.showStats(); // if (DEBUG) profiler.showStats();
PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb // PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
// // | EPhysics2DDrawFlags.Pair // // | EPhysics2DDrawFlags.Pair
// |EPhysics2DDrawFlags.CenterOfMass // |EPhysics2DDrawFlags.CenterOfMass
// |EPhysics2DDrawFlags.Joint // |EPhysics2DDrawFlags.Joint

View File

@@ -93,7 +93,7 @@ export class BossViewComp extends CCComp {
onLoad() { onLoad() {
// this.BoxRang = this.node.getChildByName("range_box"); // this.BoxRang = this.node.getChildByName("range_box");
this.as = this.node.getComponent(BossSpine); this.as = this.node.getComponent(BossSpine);
console.log(this.as) // console.log(this.as)
} }
start () { start () {

View File

@@ -0,0 +1,29 @@
import { instantiate, Prefab, Vec3 ,Node} from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { TalentComp } from "./TalentComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { smc } from "../common/SingletonModuleComp";
/** Talent 模块 */
@ecs.register(`Talent`)
export class Talent extends ecs.Entity {
/** ---------- 数据层 ---------- */
TalentView!: TalentComp
destroy(): void {
this.remove(TalentComp);
super.destroy();
}
/** 加载角色 */
load(pos: Vec3 = Vec3.ZERO,uuid:number=101,parent:Node) {
// var path = "game/monster/"+prefab_path;
var path = "game/heros/role";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = parent;
node.setScale(node.scale.x, node.scale.y, node.scale.z);
node.setPosition(pos)
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "da2ee9b0-de45-487a-8c6b-f3ab67f8ff88",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,29 @@
import { _decorator } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('TalentComp')
@ecs.register('TalentView', false)
export class TalentComp extends CCComp {
/** 视图层逻辑代码分离演示 */
start() {
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
// this.on(ModuleEvent.Cmd, this.onHandler, this);
}
/** 全局消息逻辑处理 */
// private onHandler(event: string, args: any) {
// switch (event) {
// case ModuleEvent.Cmd:
// break;
// }
// }
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "91d25bbb-9b90-479f-8e1b-b5624ee56aae",
"files": [],
"subMetas": {},
"userData": {}
}

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 { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
@@ -16,7 +16,6 @@ const { ccclass, property } = _decorator;
@ccclass('CardControllerComp') @ccclass('CardControllerComp')
@ecs.register('CardController', false) @ecs.register('CardController', false)
export class CardControllerComp extends CCComp { export class CardControllerComp extends CCComp {
card_level:number = 1; card_level:number = 1;
in_load:boolean = false in_load:boolean = false
touch_time:number = 0 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("do_reward", this.do_reward, this)
oops.message.on("minssion_victory", this.do_minssion_victory, this) oops.message.on("minssion_victory", this.do_minssion_victory, this)
oops.message.on("minssion_defeat", this.do_minssion_defeat, this) oops.message.on("minssion_defeat", this.do_minssion_defeat, this)
} }
start() { start() {
} }
show_info(uuid:number,type:number){ show_info(uuid:number,type:number){
// console.log("show_info",uuid) // console.log("show_info",uuid)
let node =this.node.getChildByName("item_box") let node =this.node.getChildByName("item_box")
@@ -202,8 +195,8 @@ export class CardControllerComp extends CCComp {
} }
to_mission(){ to_mission(){
this.node.getChildByName("mission_home").active=true this.node.getChildByName("mission_home").active=true
this.node.getChildByName("hero").active=false this.node.getChildByName("hero_home").active=false
this.node.getChildByName("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("mission_btn").getChildByName("bg").active=true
this.node.getChildByName("bar").getChildByName("hero_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=false this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=false
@@ -213,8 +206,8 @@ export class CardControllerComp extends CCComp {
} }
to_home(){ to_home(){
this.node.getChildByName("mission_home").active=false this.node.getChildByName("mission_home").active=false
this.node.getChildByName("hero").active=false this.node.getChildByName("hero_home").active=false
this.node.getChildByName("home").active=true this.node.getChildByName("shop_home").active=true
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").active=false 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("hero_btn").getChildByName("bg").active=false
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=true this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=true
@@ -224,8 +217,8 @@ export class CardControllerComp extends CCComp {
} }
to_hero(){ to_hero(){
this.node.getChildByName("mission_home").active=false this.node.getChildByName("mission_home").active=false
this.node.getChildByName("hero").active=true this.node.getChildByName("hero_home").active=true
this.node.getChildByName("home").active=false this.node.getChildByName("shop_home").active=false
this.node.getChildByName("bar").getChildByName("mission_btn").getChildByName("bg").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("hero_btn").getChildByName("bg").active=true
this.node.getChildByName("bar").getChildByName("home_btn").getChildByName("bg").active=false 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":{}}