dd
This commit is contained in:
@@ -247,11 +247,11 @@ export const SkillSet = {
|
||||
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"},
|
||||
|
||||
6004:{uuid:6004,name:"护盾",for_hero:true,sp_name:"buff_to",path:"3045",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Team,SType:SType.shield,act:"max",DTType:DTType.single,CdType:CdType.atked,AType:AType.StartEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Team,SType:SType.shield,act:"atk",DTType:DTType.single,CdType:CdType.atked,AType:AType.StartEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:0,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:10,hit:1,hited:3,buV:2,buC:0,buR:100,speed:720,cost:10,info:"为最前排队友召唤一个可以抵御2次攻击的圣盾(最高叠加到6次)"},
|
||||
|
||||
6005:{uuid:6005,name:"治疗", for_hero:true, sp_name:"heath_small",path:"3056",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Team,SType:SType.heal,act:"max",DTType:DTType.single,CdType:CdType.atked,AType:AType.StartEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Team,SType:SType.heal,act:"atk",DTType:DTType.single,CdType:CdType.atked,AType:AType.StartEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:0,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:5,hit:0,hited:0,buV:20,buC:0,buR:100,speed:0,cost:10,info:"回复最前排队友10%最大生命值的生命"},
|
||||
|
||||
6006:{uuid:6006,name:"铁斧打击",for_hero:false,sp_name:"base_ft",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
|
||||
@@ -53,17 +53,17 @@ export const HQuality = {
|
||||
ORANGE:5,
|
||||
}
|
||||
export const MonSet = {
|
||||
0:{pos:v3(390,0,0)},
|
||||
1:{pos:v3(430,0,0)},
|
||||
2:{pos:v3(470,0,0)},
|
||||
3:{pos:v3(510,0,0)},
|
||||
4:{pos:v3(550,0,0)},
|
||||
5:{pos:v3(590,0,0)},
|
||||
6:{pos:v3(630,0,0)},
|
||||
7:{pos:v3(670,0,0)},
|
||||
8:{pos:v3(710,0,0)},
|
||||
9:{pos:v3(750,0,0)},
|
||||
10:{pos:v3(790,0,0)},
|
||||
0:{pos:v3(160,0,0)},
|
||||
1:{pos:v3(220,0,0)},
|
||||
2:{pos:v3(280,0,0)},
|
||||
3:{pos:v3(340,0,0)},
|
||||
4:{pos:v3(400,0,0)},
|
||||
5:{pos:v3(460,0,0)},
|
||||
6:{pos:v3(520,0,0)},
|
||||
7:{pos:v3(440,0,0)},
|
||||
8:{pos:v3(480,0,0)},
|
||||
9:{pos:v3(520,0,0)},
|
||||
10:{pos:v3(560,0,0)},
|
||||
11:{pos:v3(830,0,0)},
|
||||
12:{pos:v3(870,0,0)},
|
||||
13:{pos:v3(910,0,0)},
|
||||
|
||||
@@ -10,30 +10,35 @@ export default class HeroAnmComp extends Component{
|
||||
|
||||
private spine?: sp.Skeleton;
|
||||
private _hasStop = true;
|
||||
private default_anim:string='Idle'
|
||||
onLoad () {
|
||||
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('Walking', 'Hurt');
|
||||
this._setMix('Idle', 'Attacking');
|
||||
this._setMix('Idle', 'Taunt');
|
||||
this._setMix('Idle', 'Walking');
|
||||
this._setMix('Idle', 'Hurt');
|
||||
this._setMix('Attacking', 'Idle');
|
||||
this._setMix('Attacking', 'Walking');
|
||||
this._setMix('Attacking', 'Hurt');
|
||||
this._setMix('Attacking', 'Taunt');
|
||||
this._setMix('Taunt', 'Walking');
|
||||
this._setMix('Taunt', 'Idle');
|
||||
this._setMix('Taunt', 'Attacking');
|
||||
this._setMix('Taunt', 'Hurt');
|
||||
this._setMix('Hurt', 'Idle');
|
||||
this._setMix('Hurt', 'Attacking');
|
||||
this._setMix('Hurt', 'Taunt');
|
||||
this._setMix('Hurt', 'Walking');
|
||||
|
||||
spine.setCompleteListener((trackEntry) => {
|
||||
var animationName = trackEntry.animation ? trackEntry.animation.name : "";
|
||||
if (animationName === 'Attacking'||animationName==='Taunt'||animationName==='Hurt') {
|
||||
this.spine!.clearTrack(1);
|
||||
if(this.node.parent.getComponent(HeroViewComp).fac==FacSet.HERO){
|
||||
this.spine?.setAnimation(0, 'Idle', false);
|
||||
}
|
||||
this.spine?.setAnimation(0, this.default_anim, true);
|
||||
}
|
||||
var loopCount = Math.floor(trackEntry.trackTime / trackEntry.animationEnd);
|
||||
// console.log("[track %s][animation %s] complete: %s", trackEntry.trackIndex, animationName, loopCount);
|
||||
@@ -85,6 +90,7 @@ export default class HeroAnmComp extends Component{
|
||||
this.spine?.setToSetupPose();
|
||||
}
|
||||
this.spine?.setAnimation(0, 'Walking', true);
|
||||
this.default_anim='Walking'
|
||||
this._hasStop = false;
|
||||
}
|
||||
atk () {
|
||||
@@ -100,6 +106,7 @@ export default class HeroAnmComp extends Component{
|
||||
idle () {
|
||||
this.spine?.setToSetupPose();
|
||||
this.spine?.setAnimation(0, 'Idle', true);
|
||||
this.default_anim='Idle'
|
||||
}
|
||||
|
||||
_setMix (anim1: string, anim2: string) {
|
||||
|
||||
@@ -132,7 +132,7 @@ export class HeroViewComp extends CCComp {
|
||||
const collider = this.node.getComponent(BoxCollider2D);
|
||||
this.scheduleOnce(()=>{
|
||||
if (collider) collider.enabled = true; // 先禁用
|
||||
},2)
|
||||
},1)
|
||||
// let anm = this.node.getChildByName("anm")
|
||||
// anm.setScale(anm.scale.x*0.8,anm.scale.y*0.8);
|
||||
}
|
||||
|
||||
@@ -35,10 +35,12 @@ export class Monster extends ecs.Entity {
|
||||
let box_group=BoxSet.MONSTER
|
||||
console.log("mon load",uuid)
|
||||
// this.addComponents<ecs.Comp>( MonModelComp, BattleMoveComp);
|
||||
var scene = smc.map.MapView.scene;
|
||||
this.brith_light(pos,scene)
|
||||
var path = "game/heros/"+HeroInfo[uuid].path;
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
var scene = smc.map.MapView.scene;
|
||||
|
||||
node.parent = scene.entityLayer!.node!
|
||||
const collider = node.getComponent(BoxCollider2D);
|
||||
if (collider) collider.enabled = false; // 先禁用 // 延迟一帧启用碰撞体
|
||||
@@ -51,7 +53,13 @@ export class Monster extends ecs.Entity {
|
||||
move.direction = -1; // 向左移动
|
||||
move.targetX = -800; // 左边界
|
||||
}
|
||||
|
||||
brith_light(pos:Vec3,scene:any){
|
||||
var path = "game/skills/map_birth";
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
node.parent = scene.entityLayer!.node!
|
||||
node.setPosition(pos)
|
||||
}
|
||||
hero_init(uuid:number=1001,node:Node,scale:number=1,box_group=BoxSet.HERO,is_boss:boolean=false,is_call:boolean=false,lv:number=1,rogueBuffData?: any[]) {
|
||||
var hv = node.getComponent(HeroViewComp)!;
|
||||
hv.hide_info()
|
||||
|
||||
Reference in New Issue
Block a user