新增事件发送接收器

This commit is contained in:
yhh
2020-06-15 12:16:23 +08:00
parent 16892eb7af
commit c3120d791f
15 changed files with 141 additions and 123 deletions

View File

@@ -8,9 +8,9 @@ class Vector2 {
* @param x 二维空间中的x坐标
* @param y 二维空间的y坐标
*/
constructor(x: number, y?: number){
this.x = x;
this.y = y ? y : x;
constructor(x? : number, y?: number){
this.x = x ? x : 0;
this.y = y ? y : this.x;
}
public static add(value1: Vector2, value2: Vector2){