调整盾技能, 盾图片资源需要换
This commit is contained in:
@@ -14,8 +14,8 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('Main')
|
||||
export class Main extends Root {
|
||||
start() {
|
||||
// PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb |
|
||||
// EPhysics2DDrawFlags.Pair |
|
||||
PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb |
|
||||
EPhysics2DDrawFlags.Pair
|
||||
// EPhysics2DDrawFlags.CenterOfMass |
|
||||
// EPhysics2DDrawFlags.Joint |
|
||||
// EPhysics2DDrawFlags.Shape;
|
||||
|
||||
@@ -231,101 +231,101 @@ export const getSkills=(quality:number)=>{
|
||||
}
|
||||
export const SkillSet = {
|
||||
6001:{uuid:6001,name:"剑气",for_hero:false,sp_name:"atk_1",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
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%攻击的伤害"},
|
||||
|
||||
6002:{uuid:6002,name:"冰球",for_hero:false,sp_name:"greenball",path:"3034",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
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%攻击的伤害"},
|
||||
|
||||
6003:{uuid:6003,name:"射击",for_hero:false,sp_name:"arrow",path:"3037",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.parabolic,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
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%攻击的伤害"},
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:2,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.cd,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次)"},
|
||||
6004:{uuid:6004,name:"护盾",for_hero:true,sp_name:"shield",path:"3045",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Team,SType:SType.shield,act:"max",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,fname:"max",flash:false,with:0,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:5,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.cd,AType:AType.StartEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Team,SType:SType.heal,act:"max",DTType:DTType.single,CdType:CdType.cd,AType:AType.StartEnd,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,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
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%攻击的伤害"},
|
||||
6007:{uuid:6007,name:"木棍打击",for_hero:false,sp_name:"base_mg",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
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%攻击的伤害"},
|
||||
6008:{uuid:6008,name:"飞刀打击",for_hero:false,sp_name:"base_sf",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
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%攻击的伤害"},
|
||||
6009:{uuid:6009,name:"石斧打击",for_hero:false,sp_name:"base_sf",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
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%攻击的伤害"},
|
||||
6010:{uuid:6010,name:"攻击",for_hero:false,sp_name:"atk1",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,RType:RType.linear,EType:EType.animationEnd,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,fname:"max",flash:false,with:0,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:0.2,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
|
||||
6011:{uuid:6011,name:"攻击",for_hero:false,sp_name:"atk2",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,RType:RType.linear,EType:EType.animationEnd,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,fname:"max",flash:false,with:0,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:0.2,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
|
||||
6020:{uuid:6020,name:"烈焰斩击",for_hero:false,sp_name:"max_fireatk",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,RType:RType.linear,EType:EType.animationEnd,fname:"max",flash:false,with:0,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,fname:"max",flash:false,with:0,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:0.2,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
|
||||
|
||||
|
||||
6021:{uuid:6021,name:"烈火护盾",for_hero:true,sp_name:"max_firedun",path:"3061",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedStart,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedStart,EType:EType.timeEnd,fname:"max",flash:false,with:90,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:10,ap:100,cd:5,hit:1,hited:1,buV:0,buC:0,buR:100,speed:80,cost:10,info:"召唤烈焰保护英雄,持续10秒,每秒对范围内的敌人造成100%伤害"},
|
||||
|
||||
6022:{uuid:6022,name:"火球术" ,for_hero:true,sp_name:"fire",path:"3039",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||||
debuff:DebuffAttr.STUN,deV:0,deC:1,deR:50,in:1,ap:100,cd:5,hit:2,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"},
|
||||
|
||||
6023:{uuid:6023,name:"龙卷风",for_hero:true, sp_name:"bwind",path:"3065",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.power,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.power,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||||
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:3,ap:100,cd:5,hit:1,hited:1,buV:0,buC:0,buR:100,speed:360,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"},
|
||||
|
||||
6024:{uuid:6024,name:"寒冰箭",for_hero:true, sp_name:"arrow_blue",path:"3060",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||||
debuff:DebuffAttr.FROST,deV:1,deC:0,deR:100,in:1,ap:100,cd:1,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
|
||||
|
||||
6025:{uuid:6025,name:"烈焰射击",for_hero:false,sp_name:"arrow_yellow",path:"3014",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.power,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.power,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||||
debuff:DebuffAttr.STUN,deV:0.5,deC:0,deR:50,in:1,ap:100,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率眩晕敌人"},
|
||||
|
||||
6026:{uuid:6026,name:"火墙", for_hero:true, sp_name:"firewall",path:"3040",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.cd,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.cd,AType:AType.fixedEnd,EType:EType.timeEnd,fname:"max",flash:false,with:90,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:10,ap:50,cd:5,hit:1,hited:1,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害"},
|
||||
|
||||
6027:{uuid:6027,name:"冰刺",for_hero:true,sp_name:"icez",path:"3049",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
debuff:DebuffAttr.FROST,deV:0,deC:0,deR:100,in:1,ap:300,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤冰刺攻击敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
|
||||
|
||||
6028:{uuid:6028,name:"潮汐", for_hero:true, sp_name:"watert",path:"3070",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:3,ap:100,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"},
|
||||
|
||||
6029:{uuid:6029,name:"陨石术",for_hero:true, sp_name:"max_yunshi",path:"3123",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:3,ap:500,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"},
|
||||
|
||||
6030:{uuid:6030,name:"冰墙", for_hero:false, sp_name:"icet",path:"3050",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.cd,AType:AType.linear,RType:RType.linear,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.cd,AType:AType.linear,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:1,ap:400,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤冰墙攻击敌人,造成200%攻击的伤害,50%几率击退敌人"},
|
||||
//召唤取消
|
||||
// 6031:{uuid:6031,name:"召唤骷髅",for_hero:true,sp_name:"zhaohuan",path:"3018",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
|
||||
// TGroup:TGroup.Self,SType:SType.zhaohuan,act:"max",DTType:DTType.single,CdType:CdType.power,AType:AType.fixedStart,RType:RType.fixed,EType:EType.animationEnd,fname:"max_blue",flash:true,with:90,
|
||||
// TGroup:TGroup.Self,SType:SType.zhaohuan,act:"max",DTType:DTType.single,CdType:CdType.power,AType:AType.fixedStart,EType:EType.animationEnd,fname:"max_blue",flash:true,with:90,
|
||||
// debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:70,cd:60,hit:1,hited:1,buV:0,buC:0,buR:100,speed:720,hero:5221,cost:10,info:"召唤一个骷髅战士为我方而战"},
|
||||
|
||||
6032:{uuid:6032,name:"陨石风暴",for_hero:true, sp_name:"fireys",path:"3101",quality:Quality.PURPLE, TType:TType.Frontline,maxC:5,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
debuff:0,deV:0,deC:0,deR:50,in:3,ap:500,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"},
|
||||
|
||||
6033:{uuid:6033,name:"龙卷风爆",for_hero:true, sp_name:"bwind",path:"3069",quality:Quality.PURPLE, TType:TType.Frontline,maxC:5,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||||
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:50,in:3,ap:100,cd:5,hit:1,hited:1,buV:0,buC:0,buR:100,speed:360,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"},
|
||||
6034:{uuid:6034,name:"大潮汐", for_hero:true, sp_name:"watert",path:"3070",quality:Quality.PURPLE, TType:TType.Frontline,maxC:5,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||||
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:50,in:3,ap:100,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"},
|
||||
|
||||
};
|
||||
@@ -323,6 +323,7 @@ export class SkillConComp extends CCComp {
|
||||
|
||||
onDestroy() {
|
||||
// 清理所有定时器
|
||||
console.log("[SkillConComp]:onDestroy:",this.node.name)
|
||||
Object.values(this._timers).forEach(clearTimeout);
|
||||
this._timers = {};
|
||||
// 移除事件监听
|
||||
|
||||
338
assets/script/game/skills/SkillCom-001.ts
Normal file
338
assets/script/game/skills/SkillCom-001.ts
Normal file
@@ -0,0 +1,338 @@
|
||||
import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween, math, RigidBody2D, Animation, sp, Tween} 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 { GameEvent } from "../common/config/GameEvent";
|
||||
import { AType, DTType, EType, RType, SkillSet, SType, TGroup } from "../common/config/SkillSet";
|
||||
import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { BezierMove } from "../BezierMove/BezierMove";
|
||||
import { MonModelComp } from "../hero/MonModelComp";
|
||||
import { FightSet } from "../common/config/Mission";
|
||||
import { HeroModelComp } from "../hero/HeroModelComp";
|
||||
import { Skill } from "./Skill";
|
||||
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('SkillCom')
|
||||
@ecs.register('SkillCom')
|
||||
export class SkillCom extends CCComp {
|
||||
s_uuid:number = 0;
|
||||
s_name:string = "";
|
||||
hero:number = 0;
|
||||
speed:number = 200;
|
||||
scale:number = 1;
|
||||
angle:number = 0;
|
||||
atk_count:number = 0;
|
||||
is_destroy:boolean = false;
|
||||
enemys:any = [];
|
||||
AType: number = 0; // 运动类型
|
||||
startPos: Vec3 = v3(); // 起始位置
|
||||
targetPos: Vec3 = v3(); // 目标位置
|
||||
duration: number = 0; // 技能持续时间
|
||||
prefabName: string = ""; // 预制体名称
|
||||
animName: string = "";
|
||||
group:number = 0; //阵营
|
||||
fac:number=0; //阵营
|
||||
caster:any=null;
|
||||
distance_x:number=0;
|
||||
distance_y:number=0;
|
||||
ap:number=0;
|
||||
buV:number=0;
|
||||
buC:number=0;
|
||||
buR:number=0;
|
||||
burn_count:number=0;
|
||||
burn_value:number=0;
|
||||
stun_time:number=0;
|
||||
stun_ratto:number=0;
|
||||
frost_ratto:number=0;
|
||||
frost_time:number=0;
|
||||
run_time:number=0;
|
||||
hited_time:number=0;
|
||||
hit_count:number=0;
|
||||
spine:sp.Skeleton=null;
|
||||
anim:Animation=null;
|
||||
tweenInstance:Tween<any> = null;
|
||||
t_end_x:number=0;
|
||||
caster_crit:number=0;
|
||||
caster_crit_d:number=0;
|
||||
puncture:number=0;
|
||||
puncture_damage:number=0;
|
||||
EType:any=null
|
||||
private moveDirection: Vec3 | null = null; // 添加一个属性来存储移动方向
|
||||
|
||||
protected onLoad(): void {
|
||||
|
||||
}
|
||||
|
||||
start() {
|
||||
this.EType=SkillSet[this.s_uuid].EType
|
||||
this.node.setPosition(this.startPos.x,this.startPos.y,0)
|
||||
if(this.node.getChildByName('anm')){
|
||||
this.spine=this.node.getChildByName('anm').getComponent('sp.Skeleton') as sp.Skeleton;
|
||||
}else{
|
||||
this.anim=this.node.getComponent(Animation)
|
||||
}
|
||||
this.on(GameEvent.MissionEnd, this.doDestroy, this);
|
||||
this.node.active = true;
|
||||
//console.log("[SkillCom]:caster",this.caster)
|
||||
|
||||
|
||||
let collider = this.getComponent(Collider2D);
|
||||
if(collider) {
|
||||
collider.group = this.group;
|
||||
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||
}
|
||||
let bm=this.node.getComponent(BezierMove)
|
||||
// //console.log(this.group +"技能 collider ",collider);
|
||||
switch(SkillSet[this.s_uuid].AType){
|
||||
case AType.parabolic:
|
||||
this.node.angle +=10
|
||||
// bm.speed=700
|
||||
if(this.group==BoxSet.MONSTER) {bm.controlPointSide=-1 }
|
||||
bm.rotationSmoothness=0.6
|
||||
bm.moveTo(this.targetPos)
|
||||
break;
|
||||
case AType.linear:
|
||||
let s_x=this.startPos.x
|
||||
let s_y=this.startPos.y
|
||||
let t_x=this.targetPos.x
|
||||
let t_y=this.targetPos.y
|
||||
// 设定目标x
|
||||
this.targetPos.x = 400;
|
||||
if(this.group == BoxSet.MONSTER) {
|
||||
bm.controlPointSide = -1;
|
||||
this.targetPos.x = -400;
|
||||
}
|
||||
// 计算斜率
|
||||
const k = (t_y - s_y) / (t_x - s_x);
|
||||
// 按直线公式计算新的y
|
||||
this.targetPos.y = k * (this.targetPos.x - s_x) + s_y;
|
||||
bm.controlPointOffset=0
|
||||
bm.rotationSmoothness=0.6
|
||||
bm.moveTo(this.targetPos);
|
||||
break;
|
||||
case AType.StartEnd:
|
||||
// 2段位移:先升高,然后移到目的地
|
||||
this.executeTwoStageMovement();
|
||||
break;
|
||||
case AType.fixedEnd:
|
||||
this.node.setPosition(this.targetPos.x > 360?300:this.targetPos.x,0,0)
|
||||
if(this.node.getComponent(Animation)){
|
||||
let anim = this.node.getComponent(Animation);
|
||||
//console.log("[SkillCom]:has anim",anim)
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
if(this.node.getChildByName('anm')){
|
||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
||||
//console.log("[SkillCom]:has spine",this.spine)
|
||||
this.spine.setCompleteListener((trackEntry) => {
|
||||
this.onAnimationFinished()
|
||||
//console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
case AType.fixedStart: //
|
||||
|
||||
this.node.setPosition(this.startPos.x > 360?300:this.startPos.x,0,0)
|
||||
|
||||
if(this.node.getComponent(Animation)){
|
||||
let anim = this.node.getComponent(Animation);
|
||||
//console.log("[SkillCom]:has anim",anim)
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
if(this.node.getChildByName('anm')){
|
||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
||||
//console.log("[SkillCom]:has spine",this.spine)
|
||||
this.spine.setCompleteListener((trackEntry) => {
|
||||
this.onAnimationFinished()
|
||||
//console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
onAnimationFinished(){
|
||||
console.log("[SkillCom]:onAnimationFinished",this.s_uuid)
|
||||
if(SkillSet[this.s_uuid].EType==EType.timeEnd) return
|
||||
this.is_destroy=true
|
||||
}
|
||||
//范围伤害
|
||||
range_damage(){
|
||||
// console.log("[SkillCom]:range_damage",this.s_uuid)
|
||||
let enemys=ecs.query(ecs.allOf(MonModelComp))
|
||||
if(this.fac==FacSet.MON) enemys=ecs.query(ecs.allOf(HeroModelComp))
|
||||
enemys.forEach(entity => {
|
||||
let view=entity.get(HeroViewComp)
|
||||
if(view){
|
||||
let dis_x =Math.abs(this.node.position.x-view.node.position.x)
|
||||
let dis_y =Math.abs(this.node.position.y-view.node.position.y)
|
||||
if(dis_x > SkillSet[this.s_uuid].with||dis_y > SkillSet[this.s_uuid].with) return
|
||||
this.single_damage(view,true)
|
||||
}
|
||||
});
|
||||
}
|
||||
//单体伤害
|
||||
single_damage(target:HeroViewComp,is_range:boolean=false){
|
||||
// //console.log("[SkillCom]:onBeginContact hit_count:",this.hit_count,SkillSet[this.s_uuid].hit)
|
||||
// if(this.hit_count > 0&&!is_range) this.ap=this.ap*(50+this.puncture_damage)/100 // 穿刺后 伤害减半,过滤范围伤害
|
||||
if(target == null) return;
|
||||
let ap=this.ap
|
||||
if(this.hit_count > 0 &&!is_range ){
|
||||
ap=ap*(50+this.puncture_damage)/100
|
||||
}
|
||||
target.do_atked(ap,this.caster_crit,this.caster_crit_d,
|
||||
this.burn_count,this.burn_value,
|
||||
this.stun_time,this.stun_ratto,
|
||||
this.frost_time,this.frost_ratto) // ap 及暴击 属性已经在skill.ts 处理
|
||||
// console.log("[SkillCom]:single_damage t:tp:rtp",this.node.position,this.targetPos,target.node.position)
|
||||
if(SkillSet[this.s_uuid].debuff>0){
|
||||
let debuff=SkillSet[this.s_uuid]
|
||||
let dev=debuff.deV*(100+this.caster.DEBUFF_VALUE)/100
|
||||
let deR=debuff.deR+this.caster.DEBUFF_UP
|
||||
dev=Math.round(dev*100)/100
|
||||
let deC=debuff.deC+this.caster.DEBUFF_COUNT //dec只作为次数叠加
|
||||
// //console.log("[SkillCom]:debuff",SkillSet[this.s_uuid].name,debuff.debuff,deUP.deV,deUP.deC)
|
||||
target.add_debuff(debuff.debuff,dev,deC,deR)
|
||||
}
|
||||
this.hit_count++
|
||||
// console.log("[SkillCom]:碰撞次数:技能次数:穿刺次数",this.hit_count,SkillSet[this.s_uuid].hit,this.puncture)
|
||||
if(this.hit_count>=(SkillSet[this.s_uuid].hit+this.puncture)&&(SkillSet[this.s_uuid].DTType!=DTType.range)&&(SkillSet[this.s_uuid].EType!=EType.animationEnd)) this.is_destroy=true // 技能命中次数
|
||||
}
|
||||
|
||||
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
||||
// console.log(this.scale+"碰撞开始 ",seCol,oCol);
|
||||
if(seCol.node.position.x-oCol.node.position.x > 100 ) return
|
||||
let target = oCol.getComponent(HeroViewComp)
|
||||
if(oCol.group!=this.group){
|
||||
if(target == null) return;
|
||||
// console.log("[SkillCom]:onBeginContact oCol||seCol",oCol.node.position,seCol.node.position)
|
||||
this.single_damage(target,SkillSet[this.s_uuid].DTType==DTType.range?true:false)
|
||||
// this.ent.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 执行2段位移:先升高,然后移到目的地
|
||||
*/
|
||||
private executeTwoStageMovement() {
|
||||
const totalDuration = SkillSet[this.s_uuid].in-0.1
|
||||
const firstStageDuration = totalDuration * 0.4; // 第一段占40%时间
|
||||
const secondStageDuration = totalDuration * 0.6; // 第二段占60%时间
|
||||
|
||||
// 第一段:升高
|
||||
const riseHeight = 100; // 升高高度
|
||||
const midPosition = v3(this.node.position.x, this.node.position.y + riseHeight, 0);
|
||||
|
||||
// 第二段:移动到目标位置
|
||||
const finalPosition = v3(this.targetPos.x, this.targetPos.y, 0);
|
||||
|
||||
// 创建缓动序列
|
||||
tween(this.node)
|
||||
// 第一段:升高
|
||||
.to(firstStageDuration, { position: midPosition }, {
|
||||
easing: 'quadOut' // 使用二次缓出效果,让上升更自然
|
||||
})
|
||||
// 第二段:移动到目标位置
|
||||
.to(secondStageDuration, { position: finalPosition }, {
|
||||
easing: 'quadInOut' // 使用二次缓入缓出效果
|
||||
}).call(()=>{
|
||||
this.do_buff()
|
||||
})
|
||||
.start();
|
||||
}
|
||||
private do_buff(){
|
||||
//console.log("[SkillCom]:do_buff")
|
||||
let teams=ecs.query(ecs.allOf(HeroModelComp))
|
||||
if(this.fac==FacSet.MON) teams=ecs.query(ecs.allOf(MonModelComp))
|
||||
if(SkillSet[this.s_uuid].TGroup==TGroup.Team||SkillSet[this.s_uuid].TGroup==TGroup.Self) {
|
||||
teams.forEach(entity => {
|
||||
let view=entity.get(HeroViewComp)
|
||||
if(view.node.position.x==this.targetPos.x){
|
||||
if(SkillSet[this.s_uuid].SType==SType.heal){
|
||||
view.add_hp(this.buV,false)
|
||||
}
|
||||
if(SkillSet[this.s_uuid].SType==SType.shield){
|
||||
view.add_shield(this.buV)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
let config=SkillSet[this.s_uuid]
|
||||
if(smc.mission.pause) {
|
||||
if(this.spine) this.spine.paused=true
|
||||
if(this.anim) this.anim.pause()
|
||||
return;
|
||||
}
|
||||
if(this.anim) this.anim.resume()
|
||||
if(this.spine) this.spine.paused=false
|
||||
if (!this.node || !this.node.isValid) return;
|
||||
if(config.EType==EType.timeEnd){
|
||||
this.run_time+=deltaTime
|
||||
if(this.run_time>config.in){
|
||||
// //console.log("[SkillCom]: timeEnd destroy",this.s_uuid,this.run_time)
|
||||
this.is_destroy=true
|
||||
}
|
||||
}
|
||||
//范围伤害
|
||||
this.hited_time+=deltaTime
|
||||
if(this.hited_time>config.hited&&(SkillSet[this.s_uuid].DTType==DTType.range)){
|
||||
this.hited_time=0
|
||||
this.range_damage()
|
||||
}
|
||||
//直线移动
|
||||
// if(this.AType == AType.linear) this.startLinearMove(deltaTime);
|
||||
this.toDestroy();
|
||||
}
|
||||
|
||||
toDestroy() {
|
||||
if(this.is_destroy){
|
||||
if (this.ent) {
|
||||
this.ent.destroy();
|
||||
} else {
|
||||
// 如果ent不存在,直接销毁节点
|
||||
if (this.node && this.node.isValid) {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
doDestroy(){
|
||||
// //console.log("[SkillCom]:doDestroy")
|
||||
this.is_destroy=true
|
||||
}
|
||||
to_console(value:any,value2:any=null,value3:any=null){
|
||||
//console.log("[SkillCom]:["+this.s_name+this.s_uuid+"]:",value,value2,value3)
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.is_destroy = false;
|
||||
this.AType = 0;
|
||||
this.speed = 0;
|
||||
this.startPos.set();
|
||||
this.targetPos.set();
|
||||
this.moveDirection = null; // 重置移动方向
|
||||
// 先移除所有碰撞回调
|
||||
const collider = this.getComponent(Collider2D);
|
||||
if (collider) {
|
||||
collider.off(Contact2DType.BEGIN_CONTACT);
|
||||
}
|
||||
this.scheduleOnce(() => {
|
||||
this.node.destroy();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
}
|
||||
1
assets/script/game/skills/SkillCom-001.ts.meta
Normal file
1
assets/script/game/skills/SkillCom-001.ts.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"dd03bf84-3e0b-43c3-b952-bbf57c82ac92","files":[],"subMetas":{},"userData":{}}
|
||||
@@ -4,7 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { AType, DTType, EType, RType, SkillSet, SType, TGroup } from "../common/config/SkillSet";
|
||||
import { AType, DTType, EType, SkillSet, SType, TGroup } from "../common/config/SkillSet";
|
||||
import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { BezierMove } from "../BezierMove/BezierMove";
|
||||
@@ -117,68 +117,52 @@ export class SkillCom extends CCComp {
|
||||
break;
|
||||
case AType.StartEnd:
|
||||
// 2段位移:先升高,然后移到目的地
|
||||
this.executeTwoStageMovement();
|
||||
this.node.setPosition(this.startPos.x > 360?300:this.startPos.x,0,0)
|
||||
this.do_anim()
|
||||
break;
|
||||
case AType.fixedEnd:
|
||||
this.node.setPosition(this.targetPos.x > 360?300:this.targetPos.x,0,0)
|
||||
if(this.node.getComponent(Animation)){
|
||||
let anim = this.node.getComponent(Animation);
|
||||
//console.log("[SkillCom]:has anim",anim)
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
if(this.node.getChildByName('anm')){
|
||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
||||
//console.log("[SkillCom]:has spine",this.spine)
|
||||
this.spine.setCompleteListener((trackEntry) => {
|
||||
this.onAnimationFinished()
|
||||
//console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
this.do_anim()
|
||||
break;
|
||||
case AType.fixedStart: //
|
||||
|
||||
this.node.setPosition(this.startPos.x > 360?300:this.startPos.x,0,0)
|
||||
|
||||
if(this.node.getComponent(Animation)){
|
||||
let anim = this.node.getComponent(Animation);
|
||||
//console.log("[SkillCom]:has anim",anim)
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
if(this.node.getChildByName('anm')){
|
||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
||||
//console.log("[SkillCom]:has spine",this.spine)
|
||||
this.spine.setCompleteListener((trackEntry) => {
|
||||
this.onAnimationFinished()
|
||||
//console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
this.node.setPosition(this.startPos.x > 360?300:this.startPos.x,0,0)
|
||||
this.do_anim()
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
do_anim(){
|
||||
if(this.node.getComponent(Animation)){
|
||||
let anim = this.node.getComponent(Animation);
|
||||
//console.log("[SkillCom]:has anim",anim)
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
if(this.node.getChildByName('anm')){
|
||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
||||
//console.log("[SkillCom]:has spine",this.spine)
|
||||
this.spine.setCompleteListener((trackEntry) => {
|
||||
this.onAnimationFinished()
|
||||
//console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
onAnimationFinished(){
|
||||
console.log("[SkillCom]:onAnimationFinished",this.s_uuid)
|
||||
if(SkillSet[this.s_uuid].EType==EType.timeEnd) return
|
||||
if(SkillSet[this.s_uuid].SType!=SType.damage){
|
||||
this.to_do_buff()
|
||||
}
|
||||
|
||||
this.is_destroy=true
|
||||
}
|
||||
//范围伤害
|
||||
range_damage(){
|
||||
// console.log("[SkillCom]:range_damage",this.s_uuid)
|
||||
let enemys=ecs.query(ecs.allOf(MonModelComp))
|
||||
if(this.fac==FacSet.MON) enemys=ecs.query(ecs.allOf(HeroModelComp))
|
||||
enemys.forEach(entity => {
|
||||
let view=entity.get(HeroViewComp)
|
||||
if(view){
|
||||
let dis_x =Math.abs(this.node.position.x-view.node.position.x)
|
||||
let dis_y =Math.abs(this.node.position.y-view.node.position.y)
|
||||
if(dis_x > SkillSet[this.s_uuid].with||dis_y > SkillSet[this.s_uuid].with) return
|
||||
this.single_damage(view,true)
|
||||
}
|
||||
});
|
||||
to_do_buff(){
|
||||
switch(SkillSet[this.s_uuid].SType){
|
||||
case SType.shield:
|
||||
this.caster.add_shield(SkillSet[this.s_uuid].buV)
|
||||
break;
|
||||
}
|
||||
}
|
||||
//单体伤害
|
||||
single_damage(target:HeroViewComp,is_range:boolean=false){
|
||||
@@ -205,7 +189,7 @@ export class SkillCom extends CCComp {
|
||||
}
|
||||
this.hit_count++
|
||||
// console.log("[SkillCom]:碰撞次数:技能次数:穿刺次数",this.hit_count,SkillSet[this.s_uuid].hit,this.puncture)
|
||||
if(this.hit_count>=(SkillSet[this.s_uuid].hit+this.puncture)&&(SkillSet[this.s_uuid].DTType!=DTType.range)&&(SkillSet[this.s_uuid].EType!=EType.animationEnd)) this.is_destroy=true // 技能命中次数
|
||||
if(this.hit_count>=(SkillSet[this.s_uuid].hit+this.puncture)&&(SkillSet[this.s_uuid].DTType!=DTType.range)&&(SkillSet[this.s_uuid].EType!=EType.animationEnd)&&(SkillSet[this.s_uuid].EType!=EType.timeEnd)) this.is_destroy=true // 技能命中次数
|
||||
}
|
||||
|
||||
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
||||
@@ -221,53 +205,6 @@ export class SkillCom extends CCComp {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 执行2段位移:先升高,然后移到目的地
|
||||
*/
|
||||
private executeTwoStageMovement() {
|
||||
const totalDuration = SkillSet[this.s_uuid].in-0.1
|
||||
const firstStageDuration = totalDuration * 0.4; // 第一段占40%时间
|
||||
const secondStageDuration = totalDuration * 0.6; // 第二段占60%时间
|
||||
|
||||
// 第一段:升高
|
||||
const riseHeight = 100; // 升高高度
|
||||
const midPosition = v3(this.node.position.x, this.node.position.y + riseHeight, 0);
|
||||
|
||||
// 第二段:移动到目标位置
|
||||
const finalPosition = v3(this.targetPos.x, this.targetPos.y, 0);
|
||||
|
||||
// 创建缓动序列
|
||||
tween(this.node)
|
||||
// 第一段:升高
|
||||
.to(firstStageDuration, { position: midPosition }, {
|
||||
easing: 'quadOut' // 使用二次缓出效果,让上升更自然
|
||||
})
|
||||
// 第二段:移动到目标位置
|
||||
.to(secondStageDuration, { position: finalPosition }, {
|
||||
easing: 'quadInOut' // 使用二次缓入缓出效果
|
||||
}).call(()=>{
|
||||
this.do_buff()
|
||||
})
|
||||
.start();
|
||||
}
|
||||
private do_buff(){
|
||||
//console.log("[SkillCom]:do_buff")
|
||||
let teams=ecs.query(ecs.allOf(HeroModelComp))
|
||||
if(this.fac==FacSet.MON) teams=ecs.query(ecs.allOf(MonModelComp))
|
||||
if(SkillSet[this.s_uuid].TGroup==TGroup.Team||SkillSet[this.s_uuid].TGroup==TGroup.Self) {
|
||||
teams.forEach(entity => {
|
||||
let view=entity.get(HeroViewComp)
|
||||
if(view.node.position.x==this.targetPos.x){
|
||||
if(SkillSet[this.s_uuid].SType==SType.heal){
|
||||
view.add_hp(this.buV,false)
|
||||
}
|
||||
if(SkillSet[this.s_uuid].SType==SType.shield){
|
||||
view.add_shield(this.buV)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
let config=SkillSet[this.s_uuid]
|
||||
@@ -286,12 +223,7 @@ export class SkillCom extends CCComp {
|
||||
this.is_destroy=true
|
||||
}
|
||||
}
|
||||
//范围伤害
|
||||
this.hited_time+=deltaTime
|
||||
if(this.hited_time>config.hited&&(SkillSet[this.s_uuid].DTType==DTType.range)){
|
||||
this.hited_time=0
|
||||
this.range_damage()
|
||||
}
|
||||
|
||||
//直线移动
|
||||
// if(this.AType == AType.linear) this.startLinearMove(deltaTime);
|
||||
this.toDestroy();
|
||||
|
||||
9
assets/script/game/skills/com.meta
Normal file
9
assets/script/game/skills/com.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "9efcc55e-db7c-4761-af6f-ee8bc2f1f63b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
29
assets/script/game/skills/com/AtkCom.ts
Normal file
29
assets/script/game/skills/com/AtkCom.ts
Normal 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('AtkComComp')
|
||||
@ecs.register('AtkCom', false)
|
||||
export class AtkComComp 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();
|
||||
}
|
||||
}
|
||||
9
assets/script/game/skills/com/AtkCom.ts.meta
Normal file
9
assets/script/game/skills/com/AtkCom.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "b1d8ed59-0347-4bb6-ab9f-86276714afca",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user