新增 CoroutineManager 协同程序

This commit is contained in:
yhh
2020-08-28 19:12:21 +08:00
parent 7a308f76b6
commit 358e899e8b
17 changed files with 760 additions and 35 deletions

View File

@@ -191,11 +191,11 @@ module es {
while (currentCell.x != lastCell.x || currentCell.y != lastCell.y){
if (tMaxX < tMaxY){
currentCell.x = MathHelper.approach(currentCell.x, lastCell.x, Math.abs(stepX));
currentCell.x = Math.floor(MathHelper.approach(currentCell.x, lastCell.x, Math.abs(stepX)));
tMaxX += tDeltaX;
}else{
currentCell.y = MathHelper.approach(currentCell.y, lastCell.y, Math.abs(stepY));
currentCell.y = Math.floor(MathHelper.approach(currentCell.y, lastCell.y, Math.abs(stepY)));
tMaxY += tDeltaY;
}