Skip to content

Commit

Permalink
👗 M Scripts/MiniGame/TowerAttack/running.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SteamTracker committed Jun 12, 2015
1 parent 00fec4e commit 24e508d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Scripts/MiniGame/TowerAttack/running.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,17 +579,14 @@ CSceneGame.prototype.OnReceiveUpdate = function()

this.m_nTarget = this.m_rgPlayerData.target;
var enemy = this.GetEnemy( this.m_rgPlayerData.current_lane, this.m_rgPlayerData.target );
if( enemy && this.m_rgGameData && this.m_rgPlayerTechTree.dps > 0 && this.m_rgPlayerData.hp > 0 )
if( enemy && this.m_rgGameData && this.m_rgPlayerData.hp > 0 )
{
var element = this.m_rgGameData.lanes[this.m_rgPlayerData.current_lane].element;

if ( this.m_rgPlayerData.crit_damage )
{
this.DoCritEffect( this.m_rgPlayerData.crit_damage, enemy.m_Sprite.position.x - 50, enemy.m_Sprite.position.y - 100, 'Crit!' );
enemy.TakeDamage();
this.m_rgPlayerData.crit_damage = 0;
}


}
}

Expand Down

0 comments on commit 24e508d

Please sign in to comment.