修改了 spine 为缓存模式

This commit is contained in:
2025-07-20 13:56:10 +08:00
parent 75b2206b70
commit c6dea41c80
30 changed files with 4701 additions and 77 deletions

View File

@@ -391,6 +391,9 @@ export const HeroInfo = {
5227:{uuid:5227,name:"精英兽人",path:"mor4", quality:HQuality.BLUE,lv:1,kind:1,
type:HType.warrior,hp:45,ap:12,dis:200,cd:2,speed:25,skills:[6007],
buff:[ ],info:"精英怪物-战士型"},
5231:{uuid:5231,name:"龙1",path:"bosswd", quality:HQuality.BLUE,lv:1,kind:1,
type:HType.warrior,hp:450,ap:12,dis:200,cd:2,speed:25,skills:[6007],
buff:[ ],info:"精英怪物-战士型"},
};
// ==================== 怪物系列分类配置 ====================
@@ -411,7 +414,7 @@ export const MonsterSeriesConfig = {
name: "兽人系列",
description: "来自荒野的兽人族群",
monsters: {
warrior: [5201, 5203, 5227], // 兽人战士、兽人护卫、精英兽人
warrior: [5201, 5203, 5227,5231], // 兽人战士、兽人护卫、精英兽人
remote: [5202], // 兽人刺客
mage: [] // 无法师
},
@@ -423,7 +426,7 @@ export const MonsterSeriesConfig = {
name: "独眼系列",
description: "古老的独眼巨人族群",
monsters: {
warrior: [5222, 5223, 5225], // 独眼巨人x2、精英独眼
warrior: [5222, 5223, 5225,5231], // 独眼巨人x2、精英独眼
remote: [5224], // 独眼巨人(远程)
mage: [] // 无法师
},
@@ -435,7 +438,7 @@ export const MonsterSeriesConfig = {
name: "牛头系列",
description: "迷宫中的牛头怪族群",
monsters: {
warrior: [5219, 5220, 5226], // 牛头战士x2、精英牛头
warrior: [5219, 5220, 5226,5231], // 牛头战士x2、精英牛头
remote: [5221], // 牛头战士(远程)
mage: [] // 无法师
},
@@ -449,7 +452,7 @@ export const MonsterSeriesConfig = {
monsters: {
warrior: [], // 无战士
remote: [], // 无远程
mage: [5204, 5205, 5206] // 石卫、土卫、树卫
mage: [5204, 5205, 5206,5231] // 石卫、土卫、树卫
},
allMonsters: [5204, 5205, 5206]
},
@@ -461,7 +464,7 @@ export const MonsterSeriesConfig = {
monsters: {
warrior: [], // 无战士
remote: [], // 无远程
mage: [5216, 5217, 5218] // 元素1、元素2、元素3
mage: [5216, 5217, 5218,5231] // 元素1、元素2、元素3
},
allMonsters: [5216, 5217, 5218]
}

View File

@@ -1,4 +1,7 @@
import { _decorator, CCClass, Component, sp,Animation} from "cc";
import { FightSet } from "../common/config/Mission";
import { FacSet } from "../common/config/BoxSet";
import { HeroViewComp } from "./HeroViewComp";
const { ccclass, property } = _decorator;
@ccclass('HeroAnmComp')
@@ -15,17 +18,19 @@ export default class HeroAnmComp extends Component{
this.is_spine=true
this.spine=this.getComponent('sp.Skeleton') as sp.Skeleton;
var spine = this.spine = this.getComponent('sp.Skeleton') as sp.Skeleton;
this._setMix('Walking', 'Idle');
this._setMix('Walking', 'Attacking');
this._setMix('Walking', 'Taunt');
this._setMix('Idle', 'Attacking');
this._setMix('Idle', 'Taunt');
this._setMix('Idle', 'Walking');
this._setMix('Attacking', 'Idle');
this._setMix('Attacking', 'Walking');
this._setMix('Taunt', 'Walking');
this._setMix('Taunt', 'Idle');
if(this.node.parent.getComponent(HeroViewComp).fac==1){
console.log('hero parent',this.node.parent.getComponent(HeroViewComp))
this._setMix('Walking', 'Idle');
this._setMix('Walking', 'Attacking');
this._setMix('Walking', 'Taunt');
this._setMix('Idle', 'Attacking');
this._setMix('Idle', 'Taunt');
this._setMix('Idle', 'Walking');
this._setMix('Attacking', 'Idle');
this._setMix('Attacking', 'Walking');
this._setMix('Taunt', 'Walking');
this._setMix('Taunt', 'Idle');
}
spine.setCompleteListener((trackEntry) => {
var animationName = trackEntry.animation ? trackEntry.animation.name : "";
if (animationName === 'Attacking'||animationName==='Taunt'||animationName==='Hurt') {

View File

@@ -109,7 +109,7 @@ export class HeroViewComp extends CCComp {
delay: number
}> = [];
private isProcessingDamage: boolean = false;
private damageInterval: number = 0.2; // 伤害数字显示间隔
private damageInterval: number = 0.01; // 伤害数字显示间隔
private timer:Timer=new Timer(1);

View File

@@ -196,6 +196,7 @@ export class SkillCom extends CCComp {
let target = oCol.getComponent(HeroViewComp)
if(oCol.group!=this.group){
if(target == null) return;
console.log("[SkillCom]:onBeginContact targetPos||skillPos",target.node.position,this.node.position)
this.single_damage(target)
// this.ent.destroy()
}