Skip to content

Commit

Permalink
fix the platformdemo/index.htm bug when the resource load slow this p…
Browse files Browse the repository at this point in the history
…roblem will appear
  • Loading branch information
flufy3d committed May 23, 2012
1 parent 6f9d4f2 commit 160d98a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/platformdemo/index.htm
Expand Up @@ -195,6 +195,7 @@ <h2>GLGE Platform Game</h2>
armatue.setLocZ(manpos[2]);
armatue.setRotZ(manrot);
zdist=gameScene.ray([manpos[0],manpos[1],manpos[2]],[0,0,1]);
if(zdist != null){
zdist=((zdist.distance*100)|0)/100;
if(zdist>7.81){
manvel[2]=manvel[2]-70*dt;
Expand All @@ -204,6 +205,13 @@ <h2>GLGE Platform Game</h2>
armatue.setAction(manland,150);
manvel=[15*incx,15*incy,0];
}
}
else{
manpos[2]=manpos[2]+(7.81-zdist);
manstate="land";
armatue.setAction(manland,150);
manvel=[15*incx,15*incy,0];
}
}else{
mantime=(new Date()).getTime();
}
Expand Down

0 comments on commit 160d98a

Please sign in to comment.