文件名称:街头霸王html5游戏
文件大小:1.28MB
文件格式:ZIP
更新时间:2020-03-23 17:20:25
html5游戏
代码纯js,无插件,便于理解。代码片段 enemyDefense: function(){ if ( this.master.statusManage.isCrouch() && this.master.enemy.statusManage.isStand() ){ return this.enemyBeat(); } this.attackEffect.start( 'defense', this.master.direction === 1 ? this.master.enemy.left + this.effect_position[ 0 ] : this.master.enemy.left + this.master.enemy.width + this.effect_position[ 0 ] , this.master.enemy.top + this.effect_position[ 1 ] ); var attack_light = this.master.statusManage.get().attack_light; var spirit = this.master.enemy.border && !this.master.statusManage.isJump() ? this.master : this.master.enemy; spirit.animate.start( ( attack_light ? -20 : -70 ) * spirit.direction, 0, 200, 'linear' ); var defenseBlood = this.master.states[ this.master.state ].defenseBlood; if ( defenseBlood ){ this.master.enemy.bloodBar.reduce( defenseBlood || 5 ); } this.master.enemy.attack.playAudio( 'sound/defense.mp3' ); },