完善 colliderTriggerHelper 用于更新碰撞信息
This commit is contained in:
20
source/src/Utils/Pair.ts
Normal file
20
source/src/Utils/Pair.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 用于管理一对对象的简单DTO
|
||||
*/
|
||||
class Pair<T> {
|
||||
public first: T;
|
||||
public second: T;
|
||||
|
||||
constructor(first: T, second: T){
|
||||
this.first = first;
|
||||
this.second = second;
|
||||
}
|
||||
|
||||
public clear(){
|
||||
this.first = this.second = null;
|
||||
}
|
||||
|
||||
public equals(other: Pair<T>){
|
||||
return this.first == other.first && this.second == other.second;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user