tiled 基本数据

This commit is contained in:
yhh
2020-08-12 12:16:35 +08:00
parent c89ed25d8a
commit 167ef03df6
24 changed files with 2625 additions and 3 deletions

View File

@@ -76,5 +76,18 @@ module es {
public static angleBetweenVectors(from: Vector2, to: Vector2) {
return Math.atan2(to.y - from.y, to.x - from.x);
}
/**
* 增加t并确保它总是大于或等于0并且小于长度
* @param t
* @param length
*/
public static incrementWithWrap(t: number, length: number){
t ++;
if (t == length)
return 0;
return t;
}
}
}