This commit is contained in:
2025-05-27 10:57:42 +08:00
parent 424edb89a7
commit cdb09a5ca1
13 changed files with 867 additions and 555 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -91,7 +91,7 @@
"__id__": 11
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 19
@@ -741,7 +741,7 @@
"__id__": 39
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 45
@@ -752,8 +752,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -23.841,
"y": -33.63,
"x": 0,
"y": -18.226,
"z": 0
},
"_lrot": {
@@ -765,8 +765,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.2,
"y": 1.2,
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
@@ -843,8 +843,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 25,
"height": 25
"width": 35,
"height": 35
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -979,8 +979,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 15.123046875,
"height": 29.2
"width": 17.90380859375,
"height": 35.5
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1018,10 +1018,10 @@
"_string": "5",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_actualFontSize": 25,
"_fontSize": 25,
"_fontFamily": "Arial",
"_lineHeight": 20,
"_lineHeight": 25,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
@@ -1128,7 +1128,7 @@
"__id__": 49
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 55
@@ -1142,8 +1142,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 3.852,
"y": -16.452,
"x": 0,
"y": -17.782,
"z": 0
},
"_lrot": {
@@ -1192,8 +1192,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -33.829,
"y": 5.074,
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
@@ -1205,8 +1205,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.3,
"y": 0.3,
"x": 0.5,
"y": 0.5,
"z": 1
},
"_mobility": 0,
@@ -1416,7 +1416,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 35,
"y": -140,
"y": -129.839,
"z": 0
},
"_lrot": {
@@ -1806,7 +1806,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": -35,
"y": -140,
"y": -129.839,
"z": 0
},
"_lrot": {

View File

@@ -6541,7 +6541,7 @@
"__id__": 275
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 281
@@ -6840,7 +6840,7 @@
"__id__": 287
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 293
@@ -7139,7 +7139,7 @@
"__id__": 299
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 305

View File

@@ -12697,7 +12697,7 @@
"r": 255,
"g": 255,
"b": 255,
"a": 179
"a": 255
},
"_spriteFrame": {
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@58cb7",
@@ -12893,7 +12893,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -192.496,
"x": 0,
"y": 423.026,
"z": 0
},
@@ -15366,7 +15366,7 @@
"b": 255,
"a": 255
},
"_string": "9999",
"_string": "5",
"_horizontalAlign": 0,
"_verticalAlign": 1,
"_actualFontSize": 40,
@@ -16035,7 +16035,7 @@
"b": 255,
"a": 255
},
"_string": "9",
"_string": "999",
"_horizontalAlign": 2,
"_verticalAlign": 1,
"_actualFontSize": 40,
@@ -17495,7 +17495,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": -148,
"y": 200,
"y": 235.382,
"z": 0
},
"_lrot": {
@@ -17636,7 +17636,7 @@
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 200,
"_verticalCenter": 235.382,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
@@ -17715,8 +17715,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 0.8,
"y": 0.8,
"z": 1
},
"_mobility": 0,
@@ -17765,7 +17765,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -233.33333333333331,
"x": 109.141,
"y": 0,
"z": 0
},
@@ -17808,7 +17808,7 @@
"__id__": 807
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 813
@@ -19123,8 +19123,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 2.842170943040401e-14,
"y": 0,
"x": -124.728,
"y": 150.476,
"z": 0
},
"_lrot": {
@@ -19166,7 +19166,7 @@
"__id__": 864
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 870
@@ -20413,7 +20413,7 @@
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_bottom": 150.476,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
@@ -20481,8 +20481,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 233.33333333333337,
"y": 0,
"x": -120.907,
"y": -110.394,
"z": 0
},
"_lrot": {
@@ -20524,7 +20524,7 @@
"__id__": 921
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 927
@@ -21771,7 +21771,7 @@
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_bottom": -110.39399999999999,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
@@ -21817,7 +21817,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 700,
"width": 875,
"height": 100
},
"_anchorPoint": {
@@ -21875,7 +21875,7 @@
"node": {
"__id__": 798
},
"_enabled": true,
"_enabled": false,
"__prefab": {
"__id__": 975
},
@@ -21955,7 +21955,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -300,
"y": -350.543,
"z": 0
},
"_lrot": {
@@ -21994,7 +21994,7 @@
"__id__": 979
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 987
@@ -22338,7 +22338,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 2.5,
"y": 67.5,
"z": 0
},
"_lrot": {
@@ -22667,7 +22667,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -62.5,
"y": 2.5,
"z": 0
},
"_lrot": {
@@ -23015,7 +23015,7 @@
"_top": 0,
"_bottom": 200,
"_horizontalCenter": 0,
"_verticalCenter": -300,
"_verticalCenter": -350.543,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,

View File

@@ -11,8 +11,8 @@ export const BossList = {
}
}
export const MissionNum = 3 //对应关卡数MissionSet 的索引
export const MissionSet = [
export const MissionNum = 3 //对应关卡数MissionMons 的索引
export const MissionMons = [
[5201,5202,5203,5204,5205,5206,5210,5211,5212],
[5213,5214,5215],
[5201],
@@ -52,3 +52,17 @@ export const MissStatus = {
choose:3,
end:4,
}
export enum FightSet {
ATK_TO_ATK_RATIO=0.1,
ATK_TO_HP_RATIO=0.2,
ATK_TO_SHIELD_RATIO=2,
ATK_LINES = 3, //英雄数
MON_GOLD_ADD =2,
MON_COIN_ADD=2,
COIN_ADD=1,
DEF_RATE=0.7,
DODGE_MAX=70,
HERO_NUM=3,
AP_UPDATE_RATE=100,
AP_CHANGE_RATE=0,
}

View File

@@ -2,7 +2,7 @@
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "1a81eb9e-feb4-483f-a5c0-ca5f0b358627",
"uuid": "26aee2e6-ab33-4155-a0aa-221c6be8d030",
"files": [],
"subMetas": {},
"userData": {}

View File

@@ -39,13 +39,19 @@ export class BuffComp extends Component {
info_init(){
this.top_node = this.node.getChildByName("top");
this.top_node.getChildByName("lv").active=(this.node.getComponent(HeroViewComp).fac == 0 ? true : false)
// this.top_node.getChildByName("hp").active=(this.node.getComponent(HeroViewComp).fac == 1 ? true : false)
this.top_node.getChildByName("sboss").active=this.node.getComponent(HeroViewComp).is_boss
this.top_node.getChildByName("lv").getChildByName("lv").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).lv.toFixed(0)
this.top_node.getChildByName("ihp").getChildByName("num").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).hp.toFixed(0)
this.top_node.getChildByName("iap").getChildByName("num").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).ap.toFixed(0)
this.top_node.getChildByName("ihp").active=false
this.top_node.getChildByName("iap").active=false
}
update(deltaTime: number) {
if(smc.mission.pause) return
// this.hp_show()
this.hp_show()
if(this.wind_cd > 0 ) this.wind_cd -= deltaTime;
if(this.wind_cd <= 0 && this.node.getChildByName("wind").active){
this.node.getChildByName("wind").active = false;
@@ -55,16 +61,10 @@ export class BuffComp extends Component {
if(this.buff_cd <= 0 && this.node.getChildByName("buff").active){
this.node.getChildByName("buff").active = false;
}
this.in_speek(deltaTime)
}
hp_show(){
if(this.node.getComponent(HeroViewComp).fac == 0) {
this.top_node.getChildByName("hp").active = false;
this.update_info_hp()
}else{
this.top_node.getChildByName("lv").active = true;
// if(this.node.getComponent(HeroViewComp).fac == 0) return
let hp=this.node.getComponent(HeroViewComp).hp;
let hp_max=this.node.getComponent(HeroViewComp).hp_max;
let hp_progress= hp/hp_max;
@@ -72,9 +72,6 @@ export class BuffComp extends Component {
if(this.node.getComponent(HeroViewComp).is_boss) return
this.top_node.getChildByName("hp").active = (hp == hp_max) ? false : true;
}
}
show_shield(val:boolean){
this.node.getChildByName("shielded").active=val
}
@@ -89,7 +86,10 @@ export class BuffComp extends Component {
iap_node.getChildByName("num").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).ap.toFixed(0)
}
update_info_lv(){
let lv_node = this.top_node.getChildByName("lv");
lv_node.getChildByName("lv").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).lv.toFixed(0)
}
show_wind(t:number=1){
this.wind_cd = t;

View File

@@ -53,6 +53,7 @@ export class Hero extends ecs.Entity {
hv.dis = hero.dis;
hv.hp= hv.hp_max =hero.hp+info.hp;
hv.ap = hero.ap+info.ap;
hv.lv=info.lv+1
hv.cd = hero.a_cd
hv.ap_u=hero.ap_u
hv.ap_ur=hero.ap_ur

View File

@@ -2,7 +2,7 @@ import { Vec3, _decorator , v3,Collider2D,Contact2DType,Label ,Node,Prefab,insta
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { HeroSpine } from "./HeroSpine";
import { BoxSet, GameSet } from "../common/config/BoxSet";
import { BoxSet } from "../common/config/BoxSet";
import { smc } from "../common/SingletonModuleComp";
import { Skill } from "../skills/Skill";
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
@@ -247,11 +247,18 @@ export class HeroViewComp extends CCComp {
}
do_change(){
this.BUFFCOMP.update_info_ap()
this.BUFFCOMP.update_info_hp()
this.BUFFCOMP.update_info_lv()
}
do_update(){
this.BUFFCOMP.update_info_ap()
this.BUFFCOMP.update_info_hp()
this.BUFFCOMP.update_info_lv()
}
do_dead(){
}
@@ -273,7 +280,7 @@ export class HeroViewComp extends CCComp {
if(this.ent == null) return;
this.ent.destroy();
}
this.BUFFCOMP.hp_show()
this.BUFFCOMP.update_info_hp()
this.showDamage(remainingDamage, true);
}
}

View File

@@ -6,7 +6,7 @@ import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/O
import { HeroModelComp } from "../hero/HeroModelComp";
import { BoxSet } from "../common/config/BoxSet";
import { MonModelComp } from "../hero/MonModelComp";
import { Missions,} from "../common/config/MissionSet";
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";

View File

@@ -1,7 +1,7 @@
import { _decorator, resources, Sprite, SpriteAtlas, SpriteFrame, v3, Vec3 } 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 { BoxSet, GameSet } from "../common/config/BoxSet";
import { BoxSet, } from "../common/config/BoxSet";
import { HeroInfo, HeroList, HeroPos, HeroSet, HeroUpInfo } from "../common/config/heroSet";
import { Hero } from "../hero/Hero";
import { smc } from "../common/SingletonModuleComp";
@@ -11,6 +11,7 @@ import { GameEvent } from "../common/config/GameEvent";
import { HeroModelComp } from "../hero/HeroModelComp";
import { HeroViewComp } from "../hero/HeroViewComp";
import { oops } from "db://oops-framework/core/Oops";
import { FightSet } from "../common/config/Mission";
const { ccclass, property } = _decorator;
@@ -113,23 +114,34 @@ export class MissionHeroCompComp extends CCComp {
for(let hero of heros){
if(hero.get(HeroViewComp).fight_pos==fight_pos){
let hv = hero.get(HeroViewComp)
let AP_UP_RATE = hv.hero_uuid === uuid ? GameSet.AP_UPDATE_RATE : GameSet.AP_CHANGE_RATE;
let heroUpData = HeroUpInfo[hv.hero_uuid] || {}
let o_ap_rate = heroUpData.ap_up_rate || 0 //被替换 升级的英雄额外被替换攻击增长比率
let o_ap = heroUpData.ap_up || 0 //被替换 升级的英雄额外被替换攻击增长值
let s_ap_rate = (HeroUpInfo[uuid] || {}).ap_up_rate || 0 //替换 升级的英雄额外替换攻击增长比率
let s_ap = (HeroUpInfo[uuid] || {}).ap_up || 0 //替换 升级的英雄额外替换攻击增长值
let o_hp_up = heroUpData.hp_up || 0 //被替换 升级的英雄额外被替换血量增长值
let s_hp_up = (HeroUpInfo[uuid] || {}).hp_up || 0 //替换 升级的英雄额外替换血量增长值
info.ap=Math.floor(hv.ap*(AP_UP_RATE+o_ap_rate+s_ap_rate)/100+o_ap+s_ap)
info.hp=Math.floor(o_hp_up+s_hp_up)
// let AP_UP_RATE = hv.hero_uuid === uuid ? FightSet.AP_UPDATE_RATE : FightSet.AP_CHANGE_RATE;
// let heroUpData = HeroUpInfo[hv.hero_uuid] || {}
// let o_ap_rate = heroUpData.ap_up_rate || 0 //被替换 升级的英雄额外被替换攻击增长比率
// let o_ap = heroUpData.ap_up || 0 //被替换 升级的英雄额外被替换攻击增长值
// let s_ap_rate = (HeroUpInfo[uuid] || {}).ap_up_rate || 0 //替换 升级的英雄额外替换攻击增长比率
// let s_ap = (HeroUpInfo[uuid] || {}).ap_up || 0 //替换 升级的英雄额外替换攻击增长值
// let o_hp_up = heroUpData.hp_up || 0 //被替换 升级的英雄额外被替换血量增长值
// let s_hp_up = (HeroUpInfo[uuid] || {}).hp_up || 0 //替换 升级的英雄额外替换血量增长值
// info.ap=Math.floor(hv.ap*(AP_UP_RATE+o_ap_rate+s_ap_rate)/100+o_ap+s_ap)
// info.hp=Math.floor(o_hp_up+s_hp_up)
if(hv.hero_uuid === uuid){
info.ap=hv.ap
info.hp=hv.hp_max
info.lv=hv.lv
}else{
this.do_hero_change()
}
hero.destroy()
return info
}
}
return info
}
do_hero_change(){
//金币加1
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
// this.node.destroy();

View File

@@ -4,7 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
import { Monster } from "../hero/Mon";
import { BoxSet } from "../common/config/BoxSet";
import { HeroSet, MonSet } from "../common/config/heroSet";
import { Missions } from "../common/config/MissionSet";
import { Missions } from "../common/config/Mission";
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
import { Timer } from "db://oops-framework/core/common/timer/Timer";
import { smc } from "../common/SingletonModuleComp";

View File

@@ -5,7 +5,7 @@ import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/O
import { smc } from "../common/SingletonModuleComp";
import { HeroViewComp } from "../hero/HeroViewComp";
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
import { MissionReward } from "../common/config/MissionSet";
import { MissionReward } from "../common/config/Mission";
import { Items } from "../common/config/Items";
import { Item } from "./Item";
import { UIID } from "../common/config/GameUIConfig";