diff --git a/assets/script/game/hero/HeroAnmComp.ts b/assets/script/game/hero/HeroAnmComp.ts index 1c3a7178..a465dea9 100644 --- a/assets/script/game/hero/HeroAnmComp.ts +++ b/assets/script/game/hero/HeroAnmComp.ts @@ -9,6 +9,7 @@ export default class HeroAnmComp extends Component{ fsSprite:FlashSprite = null!; private anmcon:any=null private _hasStop = true; + private _atkIndex = 0; private default_anim:string='Idle' anms:any[]=["idle","move","stun","dead","buff","atk0","atk1","atk2","max0","max1"] onLoad () { @@ -42,8 +43,9 @@ export default class HeroAnmComp extends Component{ } atk () { if(this.anmcon.getState("max0").isPlaying) return - // if(this.anmcon.getState("atk0").isPlaying) return - this.anmcon.play("atk0") + const atkName = `atk${this._atkIndex}` + this.anmcon.play(atkName) + this._atkIndex = (this._atkIndex + 1) % 3 } max () { if(this.anmcon.getState("max0").isPlaying) return @@ -62,4 +64,4 @@ export default class HeroAnmComp extends Component{ if(this.anmcon.getState("dead").isPlaying) return this.anmcon.play("dead") } -} \ No newline at end of file +} diff --git a/assets/script/game/hero/MoveComp.ts b/assets/script/game/hero/MoveComp.ts index e8fc4899..632ac6db 100644 --- a/assets/script/game/hero/MoveComp.ts +++ b/assets/script/game/hero/MoveComp.ts @@ -37,7 +37,7 @@ interface MoveFacConfig { @ecs.register('MoveSystem') export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate { private readonly meleeAttackRange = HeroDisVal[HType.Melee]; - private readonly meleeMinEnemyDistanceX = 80; + private readonly meleeMinEnemyDistanceX = 60; private readonly meleeOvertakeSpeedGap = 20; private readonly allySpacingX = 40; private readonly allyOverlapSpacingX = 14;