コード例 #1
0
 public override bool CheckRect(TSVector2 sCenter, TSVector2 sDir, FP nHalfWidth, FP nHalfHeight)
 {
     return(TSCheck2D.CheckRectangleAndCircle(sCenter, sDir, nHalfWidth, nHalfHeight, this.center, radius));
 }
コード例 #2
0
 public override bool CheckLine(TSVector2 sOrgPos, TSVector2 sOffset, out TSVector2 sCrossPoint)
 {
     sCrossPoint = sOrgPos;
     return(TSCheck2D.CheckCicleAndLine(sOrgPos, sOffset, this.center, radius, out sCrossPoint));
 }
コード例 #3
0
 public override bool CheckPos(TSVector2 sPosition)
 {
     return(TSCheck2D.CheckCicleAndPos(this.center, radius, sPosition));
 }
コード例 #4
0
 public C2D_Circle(TSVector2 center, TSVector2 forward, FP radius) : base(center, forward)
 {
     this.radius = radius;
 }
コード例 #5
0
 public override bool CheckCircle(TSVector2 sCenter, FP nRadius)
 {
     return(TSCheck2D.CheckCircleAndCircle(this.center, radius, sCenter, nRadius));
 }
コード例 #6
0
 public override bool CheckPos(TSVector2 sPosition)
 {
     return(TSCheck2D.CheckRectangleAndPos(this.center, this.forward, halfWidth, halfHeight, sPosition));
 }
コード例 #7
0
 public override bool CheckRect(TSVector2 sCenter, TSVector2 sDir, FP nHalfWidth, FP nHalfHeight)
 {
     throw new Exception("需要实现矩形与矩形之间的碰撞");
 }
コード例 #8
0
 public C2D_Rect(TSVector2 center, TSVector2 forward, FP nHalfWidth, FP nHalfHeight) : base(center, forward)
 {
     halfWidth  = nHalfWidth;
     halfHeight = nHalfHeight;
 }
コード例 #9
0
 public override bool CheckCircle(TSVector2 sCenter, FP nRadius)
 {
     return(TSCheck2D.CheckRectangleAndCircle(this.center, this.forward, halfWidth, halfHeight, sCenter, nRadius));
 }
コード例 #10
0
 abstract public bool CheckRect(TSVector2 sCenter, TSVector2 sDir, FP nHalfWidth, FP nHalfHeight);
コード例 #11
0
 abstract public bool CheckCircle(TSVector2 sCenter, FP nRadius);
コード例 #12
0
 abstract public bool CheckPos(TSVector2 sPosition);
コード例 #13
0
 abstract public bool CheckLine(TSVector2 sOrgPos, TSVector2 sOffset, out TSVector2 sCrossPoint);
コード例 #14
0
 public Check2DCollider(TSVector2 center, TSVector2 forward)
 {
     this.center  = center;
     this.forward = forward;
 }