diff -r 89349dfb846109efa7746c3c35c616ab778962de -r 1dffc3cc41e107996640e3064ed2d21516c35f0a axios/Axios_WP7.csproj
--- a/axios/Axios_WP7.csproj Fri Mar 23 22:19:58 2012 -0500
+++ b/axios/Axios_WP7.csproj Fri Mar 23 23:21:26 2012 -0500
@@ -179,6 +179,7 @@
+
diff -r 89349dfb846109efa7746c3c35c616ab778962de -r 1dffc3cc41e107996640e3064ed2d21516c35f0a axios/Axios_Windows.csproj
--- a/axios/Axios_Windows.csproj Fri Mar 23 22:19:58 2012 -0500
+++ b/axios/Axios_Windows.csproj Fri Mar 23 23:21:26 2012 -0500
@@ -219,6 +219,7 @@
+
diff -r 89349dfb846109efa7746c3c35c616ab778962de -r 1dffc3cc41e107996640e3064ed2d21516c35f0a axios/Axios_Xbox_360.csproj
--- a/axios/Axios_Xbox_360.csproj Fri Mar 23 22:19:58 2012 -0500
+++ b/axios/Axios_Xbox_360.csproj Fri Mar 23 23:21:26 2012 -0500
@@ -172,6 +172,7 @@
+
diff -r 89349dfb846109efa7746c3c35c616ab778962de -r 1dffc3cc41e107996640e3064ed2d21516c35f0a axios/Engine/Structures/AxiosPoint.cs
--- a/axios/Engine/Structures/AxiosPoint.cs Fri Mar 23 22:19:58 2012 -0500
+++ b/axios/Engine/Structures/AxiosPoint.cs Fri Mar 23 23:21:26 2012 -0500
@@ -7,6 +7,25 @@
{
class AxiosPoint
{
-
+ private float _x;
+ private float _y;
+
+ public float X
+ {
+ get { return _x; }
+ set { _x = value; }
+ }
+
+ public float Y
+ {
+ get { return _y; }
+ set { _y = value; }
+ }
+
+ public AxiosPoint(float X, float Y)
+ {
+ _x = X;
+ _y = Y;
+ }
}
}
diff -r 89349dfb846109efa7746c3c35c616ab778962de -r 1dffc3cc41e107996640e3064ed2d21516c35f0a axios/Engine/Structures/AxiosRectangle.cs
--- a/axios/Engine/Structures/AxiosRectangle.cs Fri Mar 23 22:19:58 2012 -0500
+++ b/axios/Engine/Structures/AxiosRectangle.cs Fri Mar 23 23:21:26 2012 -0500
@@ -7,10 +7,11 @@
{
class AxiosRectangle
{
+
+ private AxiosPoint _point;
private float _width;
private float _height;
- private float _x;
- private float _y;
+
public float Width
{
@@ -24,43 +25,52 @@
set { _height = value; }
}
- public float X
+ public float Top
{
- get { return _x; }
- set { _x = value; }
+ get { return _point.Y; }
}
- public float Y
+ public float Right
{
- get { return _y; }
- set { _y = value; }
+ get { return _point.X + _width; }
}
- public float Top
+ public float Left
{
-
+ get { return _point.X; }
}
public float Bottom
{
- get { return _y + _height; }
+ get { return _point.Y + _height; }
}
+ /*public AxiosPoint Center
+ {
+ get { return new AxiosPoint(Top + (Width / 2), Bottom - (Width / 2)); }
+ }*/
+
public bool Intersect(AxiosRectangle rect)
{
- bool intersects = false;
+ //bool intersects = true;
+ if (Bottom < rect.Top)
+ return false;
+ if (Top > rect.Bottom)
+ return false;
+ if (Right < rect.Left)
+ return false;
+ if (Left > rect.Right)
+ return false;
-
- return intersects;
+ return true;
}
public AxiosRectangle(float X, float Y, float width, float height)
{
_width = width;
_height = height;
- _x = X;
- _y = Y;
+ _point = new AxiosPoint(X, Y);
}