dd
This commit is contained in:
@@ -46,6 +46,7 @@ export class CardControllerComp extends CCComp {
|
||||
}
|
||||
page_init(){
|
||||
this.node.getChildByName("mission_home").active=true;
|
||||
this.node.getChildByName("mission").active=false;
|
||||
|
||||
}
|
||||
mission_home_to_mission(){
|
||||
|
||||
@@ -3,13 +3,9 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
|
||||
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 { HeroModelComp } from "../hero/HeroModelComp";
|
||||
import { BoxSet } from "../common/config/BoxSet";
|
||||
import { MonModelComp } from "../hero/MonModelComp";
|
||||
import { Missions} from "../common/config/Mission";
|
||||
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
|
||||
import { VictoryComp } from "./VictoryComp";
|
||||
import { MSkillComp } from "./MSkillComp";
|
||||
import { CardControllerComp } from "./CardController";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { HeroSkillsComp } from "../skill/heroSkillsComp";
|
||||
@@ -28,15 +24,21 @@ export class MissionComp extends CCComp {
|
||||
reward_num:number = 0;
|
||||
game_over:boolean = false;
|
||||
fight_start:boolean = false;
|
||||
mission_buff_type:number = 1 // 1 攻击 2 防御 3 HP
|
||||
m_mission_buff_type:number = 1 // 1 攻击 2 防御 3 HP
|
||||
mission_buff_up_exp:number = 99999999
|
||||
MSComp:MSkillComp=null
|
||||
MMSComp:MSkillComp=null
|
||||
heros_node:any=null
|
||||
heros_node_pos:any=v3(0,0,0)
|
||||
herosc_node:any=null
|
||||
hero_args:any=null
|
||||
mission_data:any={
|
||||
gold:10,//金币
|
||||
refresh_gold:1,//刷新金币
|
||||
call_gold:3,//召唤金币
|
||||
exp:0,//经验
|
||||
skp:0,//技能点
|
||||
box:0,//宝箱
|
||||
energy:0,//能量
|
||||
hp:0,//血量
|
||||
ap:0,//攻击
|
||||
}
|
||||
onLoad(){
|
||||
|
||||
}
|
||||
@@ -98,7 +100,17 @@ export class MissionComp extends CCComp {
|
||||
this.fight_start=false
|
||||
smc.mission.is_victory=false
|
||||
smc.mission.is_defeat=false
|
||||
|
||||
smc.vmdata.mission_data ={
|
||||
gold:10,//金币
|
||||
refresh_gold:1,//刷新金币
|
||||
call_gold:3,//召唤金币
|
||||
exp:0,//经验
|
||||
skp:0,//技能点
|
||||
box:0,//宝箱
|
||||
energy:0,//能量
|
||||
hp:0,//血量
|
||||
ap:0,//攻击
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -140,6 +140,7 @@ export class MissionHeroCompComp extends CCComp {
|
||||
}
|
||||
do_hero_change(){
|
||||
//金币加1
|
||||
smc.vmdata.mission_data.gold+=1
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
|
||||
@@ -18,9 +18,9 @@ export class MissionMonCompComp extends CCComp {
|
||||
timer:Timer=new Timer(10)
|
||||
// 添加刷怪队列
|
||||
private monsterQueue: Array<{uuid: number, position: number, isBoss: boolean}> = [];
|
||||
private isSpawning: boolean = false;
|
||||
private isSpawning: boolean = false;// 是否正在生成怪物
|
||||
private spawnInterval: number = 0.5; // 每个怪物生成间隔时间
|
||||
private spawnTimer: number = 0;
|
||||
private spawnTimer: number = 0; // 生成计时器
|
||||
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
start() {
|
||||
|
||||
Reference in New Issue
Block a user