diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/0a05b2f3-f4af-4a6f-a20c-ed9b67a102b8.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/0a05b2f3-f4af-4a6f-a20c-ed9b67a102b8.vsidx
new file mode 100644
index 00000000..9adaa37a
Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/0a05b2f3-f4af-4a6f-a20c-ed9b67a102b8.vsidx differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/20b583c6-561d-47c9-abd3-60cfdfd314d1.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/20b583c6-561d-47c9-abd3-60cfdfd314d1.vsidx
deleted file mode 100644
index 9bd1696c..00000000
Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/20b583c6-561d-47c9-abd3-60cfdfd314d1.vsidx and /dev/null differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/270d3872-75bd-46b7-a2bd-9f8255c673d1.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/270d3872-75bd-46b7-a2bd-9f8255c673d1.vsidx
new file mode 100644
index 00000000..3da4758d
Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/270d3872-75bd-46b7-a2bd-9f8255c673d1.vsidx differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/33343802-69a8-4b00-a6e0-a6aede8c96ef.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/33343802-69a8-4b00-a6e0-a6aede8c96ef.vsidx
new file mode 100644
index 00000000..0132b317
Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/33343802-69a8-4b00-a6e0-a6aede8c96ef.vsidx differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/40130cdf-f93d-4097-8cf2-c07e1598b0d7.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/40130cdf-f93d-4097-8cf2-c07e1598b0d7.vsidx
deleted file mode 100644
index 6d2872fe..00000000
Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/40130cdf-f93d-4097-8cf2-c07e1598b0d7.vsidx and /dev/null differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/a985188a-1f37-45ed-ba50-2ce5492de85f.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/a985188a-1f37-45ed-ba50-2ce5492de85f.vsidx
new file mode 100644
index 00000000..a5d2dbdf
Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/a985188a-1f37-45ed-ba50-2ce5492de85f.vsidx differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/c3349a48-f366-423d-b1a9-68f6aaf78344.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/c3349a48-f366-423d-b1a9-68f6aaf78344.vsidx
deleted file mode 100644
index 36157ed4..00000000
Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/c3349a48-f366-423d-b1a9-68f6aaf78344.vsidx and /dev/null differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/f938f46e-6705-4ee8-8715-39f9bdc49ecd.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/f938f46e-6705-4ee8-8715-39f9bdc49ecd.vsidx
deleted file mode 100644
index 5d9be583..00000000
Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/f938f46e-6705-4ee8-8715-39f9bdc49ecd.vsidx and /dev/null differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/v17/.suo b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/v17/.suo
index 2da4e1de..f22030a8 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/v17/.suo and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/v17/.suo differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Debug/Program.cs b/源代码/.Net Framework/Stg_Sharp/Debug/Program.cs
index 632a49d5..8405ce23 100644
--- a/源代码/.Net Framework/Stg_Sharp/Debug/Program.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Debug/Program.cs
@@ -1,4 +1,5 @@
using StgSharp;
+using StgSharp.Geometry;
using System;
using System.Collections.Generic;
using System.Data;
@@ -12,7 +13,7 @@ namespace Debug
{
static void Main(string[] args)
{
-
+ Console.WriteLine(typeof(PointOnLine).BaseType.ToString());
}
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/Debug.exe b/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/Debug.exe
index 5f3bac6d..f700fd42 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/Debug.exe and b/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/Debug.exe differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/Debug.pdb b/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/Debug.pdb
index 816db681..c939960f 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/Debug.pdb and b/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/Debug.pdb differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/StgSharp.dll b/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/StgSharp.dll
index b60a0132..e73313dc 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/StgSharp.dll and b/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/StgSharp.dll differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/StgSharp.pdb b/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/StgSharp.pdb
index ebe7255d..9c40f9a9 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/StgSharp.pdb and b/源代码/.Net Framework/Stg_Sharp/Debug/bin/Debug/StgSharp.pdb differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.csproj.AssemblyReference.cache b/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.csproj.AssemblyReference.cache
index 3e9f2b37..f9c677fe 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.csproj.AssemblyReference.cache and b/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.csproj.AssemblyReference.cache differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.exe b/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.exe
index 5f3bac6d..f700fd42 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.exe and b/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.exe differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.pdb b/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.pdb
index 816db681..c939960f 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.pdb and b/源代码/.Net Framework/Stg_Sharp/Debug/obj/Debug/Debug.pdb differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Bind.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Bind.cs
index f3105e82..775f1b7a 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Bind.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Bind.cs
@@ -10,7 +10,7 @@ namespace StgSharp.Control
{
public class Bind
{
- public void Simple(Point p, GeometryI g)
+ public void Simple(IPoint p, IGeometry g)
{
if (g!=null)
{
@@ -23,11 +23,11 @@ namespace StgSharp.Control
///
/// 绑定的点
/// 被限定的圆
- public void Complex(Point p, Circle c)
+ public void Complex(IPoint p, Circle c)
{
c._bindPoint = p;
}
- public void Complex(Point p, Line l)
+ public void Complex(IPoint p, Line l)
{
l.EndingPoint = p;
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Create.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Create.cs
index 12eb4d17..54f5f65f 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Create.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Create.cs
@@ -1,4 +1,5 @@
-using System;
+using StgSharp.Geometry;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -8,6 +9,9 @@ namespace StgSharp.Control
{
public class Create
{
-
+ public void Geometry(IPoint center, float radius, float angle, int num)
+ {
+
+ }
}
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs
new file mode 100644
index 00000000..15681911
--- /dev/null
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs
@@ -0,0 +1,36 @@
+using StgSharp.Logic;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.ExceptionServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Control
+{
+ public abstract class Pool
+ {
+ private LinkedList _pool01;
+ private LinkedList _pool02;
+ private LinkedList _pool03;
+ private LinkedList _pool04;
+
+
+ public Pool()
+ {
+
+ }
+
+ public void Creat()
+ {
+ for (int i = 0; i < 4; i++)
+ {
+
+ }
+ }
+
+
+
+
+ }
+}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Bullet.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Bullet.cs
index ca5bd67b..b6765cfa 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Bullet.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Bullet.cs
@@ -1,4 +1,5 @@
-using StgSharp.Logic;
+using StgSharp.Geometry;
+using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -7,165 +8,39 @@ using System.Threading.Tasks;
namespace StgSharp.Entity
{
- internal unsafe class Bullet : LinkedObject
+ public class Bullet : LinkedObject
{
+ private IPoint _location;
- //子弹的缩放比例
- private float _size;
-
- public float Size
+ public IPoint Location
{
- get { return _size; }
- set
- {
- if (value > 0)
- {
- _size = value;
- this.Radius = DefualtRadius * Size;
- }
- else
- {
- throw new ArgumentException("Size cannot be smaller than zero!");
- }
- }
+ get { return _location; }
+ set { _location = value; }
}
- //该种类子弹的默认大小
- private static float _defualtRadius;
+ private float _x;
+ private float _y;
- public static float DefualtRadius
- {
- get { return _defualtRadius; }
- set { _defualtRadius = value; }
- }
-
- //子弹的实际判定半径
- private float _radius;
-
- public float Radius
- {
- get { return _radius; }
- set { _radius = value; }
- }
-
- //子弹x轴运动的函数表达
- private float[] _xVelocity;
-
- public float[] XVelocity
- {
- get { return _xVelocity; }
- set
- {
- if (value.Length == 10)
- {
- _xVelocity = value;
- }
- else
- {
- throw new ArgumentException("Too many or too few parameters!");
- }
- }
- }
-
- //子弹y轴运动的函数表达
- private float[] _yVelocity;
-
- public float[] YVelocity
- {
- get { return _yVelocity; }
- set
- {
- if (value.Length == 10)
- {
- _yVelocity = value;
- }
- else
- {
- throw new ArgumentException("Too many or too few parameters!");
- }
- }
- }
-
- private float* _x;
-
- //xy坐标
- public float* X
+ public float X
{
get { return _x; }
set { _x = value; }
}
- private float* _y;
-
- public float* Y
+ public float Y
{
get { return _y; }
set { _y = value; }
}
- private uint _beginTick;
-
- public uint BeginTick
- {
- get { return _beginTick; }
- set { _beginTick = value; }
- }
-
public Bullet()
{
+
}
- //通过传入的时间刻计算位移并更新位置坐标
- public void move(uint tick)
+ public void OnRender()
{
- float deltaTick = tick - _beginTick;
- float deltaX = 0;
- for (int i = 0; i < 10; i++)
- {
- deltaX += _xVelocity[i];
- deltaX *= deltaTick;
- }
- deltaX += _xVelocity[10];
- *_x += deltaX;
- float deltaY = 0;
- for (int i = 0; i < 10; i++)
- {
- deltaY += _yVelocity[i];
- deltaY *= deltaTick;
- }
- deltaY += _yVelocity[10];
- *_y += deltaY;
- }
-
-
-
- ///
- /// 修改自身路径,修改条件由外部逻辑判断触发
- ///
- public void ChangeVelocity(float[] XSpeed, float[] YSpeed)
- {
- if (XSpeed != null)
- {
- if (XSpeed.Length == 10)
- {
- this._xVelocity = XSpeed;
- }
- else
- {
- throw new Exception("The amount of parameters should be 10!");
- }
- }
- if (YSpeed != null)
- {
- if (YSpeed.Length == 10)
- {
- this._yVelocity = YSpeed;
- }
- else
- {
- throw new Exception("The amount of parameters should be 10!");
- }
- }
+
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/ComplexOperationHandler.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/ComplexOperationHandler.cs
similarity index 100%
rename from 源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/ComplexOperationHandler.cs
rename to 源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/ComplexOperationHandler.cs
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Enemy.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Enemy.cs
index 31f6594f..e9fff329 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Enemy.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Enemy.cs
@@ -1,4 +1,5 @@
-using System;
+using StgSharp.Geometry;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -24,7 +25,24 @@ namespace StgSharp.Entity
set { _y = value; }
}
+ private IPoint _location;
+ public IPoint Location
+ {
+ get { return _location; }
+ set { _location = value; }
+ }
+
+ public Enemy()
+ {
+
+ }
+
+
+ public void OnRender()
+ {
+
+ }
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Launcher.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Launcher.cs
index cc710839..ebd38bc4 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Launcher.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Launcher.cs
@@ -9,9 +9,9 @@ namespace StgSharp.Entity
{
internal unsafe class Launcher
{
- private Point _location;
+ private IPoint _location;
- public Point Location
+ public IPoint Location
{
get { return _location; }
set { _location = value; }
@@ -26,22 +26,32 @@ namespace StgSharp.Entity
private float _y;
- public float YPosition
+ public float Y
{
get { return _y; }
set { _y = value; }
}
+ private Bullet _launchType;
- public Launcher()
+ public Bullet LaunchType
{
-
+ get { return _launchType; }
+ set { _launchType = value; }
}
- public void Bind(Point loc)
+ public Launcher(Bullet launchType, IPoint loc)
{
+ _launchType = launchType;
+ _location = loc;
}
+
+
+ public void Launch()
+ {
+
+ }
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Player.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Player.cs
index 18f0d9f9..1b9a9d9d 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Player.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Player.cs
@@ -184,7 +184,7 @@ namespace StgSharp.Entity
{
if (_keyboardState.IsKeyDown(Key.Z))
{
-
+ _launcherAtLow.Launch();
}
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Game/Class1.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Game/Class1.cs
deleted file mode 100644
index a73442dd..00000000
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Game/Class1.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace StgSharp.Game
-{
- internal class Class1
- {
- }
-}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Game/CoreInfo.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Game/CoreInfo.cs
new file mode 100644
index 00000000..15166dbe
--- /dev/null
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Game/CoreInfo.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StgSharp.Game
+{
+ public class CoreInfo
+ {
+ public static readonly string _coreSignature;
+ public static readonly string _coreName;
+
+ internal string CoreEdition
+ {
+ get { return _coreName; }
+ }
+
+ internal string CoreSignature
+ {
+ get { return _coreSignature; }
+ }
+
+
+ public void ShowVersion()
+ {
+ Console.WriteLine($"StgSharp core: {_coreName}");
+ Console.WriteLine($"StgSharp core signature: {_coreSignature}");
+ }
+
+
+ }
+}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Circle.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Circle.cs
index 25ad834a..f3aa19e6 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Circle.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Circle.cs
@@ -72,7 +72,13 @@ namespace StgSharp.Geometry
readonly private Counter tickCounter;
readonly private uint beginTick;
+ public ComplexOperationHandler complexOperationHandler;
+ public event ComplexOperationHandler ComplexOperation
+ {
+ add { complexOperationHandler += value; }
+ remove { complexOperationHandler -= value; }
+ }
///
/// 创建一个圆的快速方法
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/IGeometry.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/IGeometry.cs
index e5f61fb2..6b340875 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/IGeometry.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/IGeometry.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace StgSharp.Geometry
{
- internal interface IGeometry
+ public interface IGeometry
{
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointCommon.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointCommon.cs
index 0d0db97f..ffdbf268 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointCommon.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointCommon.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace StgSharp.Geometry
{
- internal class PointCommon : LinkedObject, IPoint
+ public class PointCommon : LinkedObject, IPoint
{
private readonly float x0;
private readonly float y0;
@@ -83,12 +83,15 @@ namespace StgSharp.Geometry
}
- public PointCommon(float x,float y,Counter tickCounter)
+ public PointCommon(float x,float y,float angle,Counter tickCounter)
{
_x = x;
x0 = x;
_y = y;
y0 = y;
+
+ angle0 = angle;
+
_tickCounter = tickCounter;
beginTick = _tickCounter.Value;
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnCircle.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnCircle.cs
index eff1ce75..45a23253 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnCircle.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnCircle.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace StgSharp.Geometry
{
- public unsafe class PointOnCircle :LinkedObject, IPoint
+ public class PointOnCircle :LinkedObject, IPoint
{
private Circle _bindedItem;
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnLine.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnLine.cs
index 54d09531..dbf7f854 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnLine.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnLine.cs
@@ -49,8 +49,7 @@ namespace StgSharp.Geometry
set { _angle = value; }
}
-
- private float rate;
+ private float _rate;
public PointOnLine(IPoint beginPoint, IPoint endPoint, float rate, int number)
{
@@ -59,7 +58,7 @@ namespace StgSharp.Geometry
_angle = (float)(Math.Atan2(endPoint.Y - beginPoint.Y, endPoint.X - beginPoint.Y));
- rate = rate * number;
+ _rate = rate * number;
this._y = beginPoint.Y + rate * (endPoint.Y - beginPoint.Y);
this._x = beginPoint.X + rate * (endPoint.X - beginPoint.X);
}
@@ -68,8 +67,8 @@ namespace StgSharp.Geometry
{
_angle = (float)(Math.Atan2(_endPoint.Y - _beginPoint.Y, _endPoint.X - _beginPoint.Y));
- this._y = _beginPoint.Y + rate * (_endPoint.Y - _beginPoint.Y);
- this._x = _beginPoint.X + rate * (_endPoint.X - _beginPoint.X);
+ this._y = _beginPoint.Y + _rate * (_endPoint.Y - _beginPoint.Y);
+ this._x = _beginPoint.X + _rate * (_endPoint.X - _beginPoint.X);
}
}
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/EntityContainer.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/EntityContainer.cs
index af960189..af2bbc27 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/EntityContainer.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/EntityContainer.cs
@@ -14,6 +14,11 @@ namespace StgSharp.Logic
private float _topBorder;
private float _bottomBorder;
+ private EntityContainer left;
+ private EntityContainer right;
+ private EntityContainer top;
+ private EntityContainer bottom;
+
public int Limit
{
get { return _limit; }
@@ -45,13 +50,33 @@ namespace StgSharp.Logic
{
}
- //Move an entity from one container to another one
- public void Move(LinkedObject target, EntityContainer targetContainer)
+
+ public void MoveLeft(LinkedObject target)
{
target.Previous = target.Next;
target.Next = target.Previous;
- targetContainer.Add(target);
+ left.Add(target);
+ }
+ public void MoveRight(LinkedObject target)
+ {
+ target.Previous = target.Next;
+ target.Next = target.Previous;
+ right.Add(target);
+ }
+
+ public void MoveUp(LinkedObject target)
+ {
+ target.Previous = target.Next;
+ target.Next = target.Previous;
+ top.Add(target);
+ }
+
+ public void Movebottom(LinkedObject target)
+ {
+ target.Previous = target.Next;
+ target.Next = target.Previous;
+ bottom.Add(target);
}
//What should a container do on each rendering frame
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/GeometryContainer.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/GeometryContainer.cs
index 644b9253..1792c247 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/GeometryContainer.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/GeometryContainer.cs
@@ -7,15 +7,9 @@ using System.Threading.Tasks;
namespace StgSharp.Logic
{
- public class GeometryContainer
+ public class GeometryContainer:LinkedList,IContainer
{
- private LinkedList _container;
-
- public LinkedList Container
- {
- get { return _container; }
- set { _container = value; }
- }
+
private float _leftBorder;
@@ -33,20 +27,28 @@ namespace StgSharp.Logic
set { _rightBorder = value; }
}
- private float _upBorder;
+ private float _topBorder;
- public float UpBorder
+ public float TopBorder
{
- get { return _upBorder; }
- set { _upBorder = value; }
+ get { return _topBorder; }
+ set { _topBorder = value; }
}
- private float _downBorder;
+ private float _bottomBorder;
- public float DownBorder
+ public float BottomBorder
{
- get { return _downBorder; }
- set { _downBorder = value; }
+ get { return _bottomBorder; }
+ set { _bottomBorder = value; }
+ }
+
+ private int _limit;
+
+ public int Limit
+ {
+ get { return _limit; }
+ set { _limit = value; }
}
public GeometryContainer()
@@ -54,9 +56,9 @@ namespace StgSharp.Logic
}
- public void Add(LinkedObject t)
+ public void OnRender()
{
- Container.Add(t);
+
}
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/LinkedList.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/LinkedList.cs
index 9f360571..82bd45bf 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/LinkedList.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/LinkedList.cs
@@ -11,7 +11,7 @@ namespace StgSharp.Logic
protected LinkedObject _heading;
protected LinkedObject _ending;
private LinkedObject _cache;
- private Counter _amountCounter;
+ private Counter _amountCounter;
public LinkedObject Heading
{
@@ -29,7 +29,7 @@ namespace StgSharp.Logic
get { return _cache; }
set { _cache = value; }
}
- public Counter AmountCounter
+ public Counter AmountCounter
{
get { return _amountCounter; }
set { _amountCounter = value; }
@@ -38,7 +38,7 @@ namespace StgSharp.Logic
//构造器
public LinkedList()
{
- this._amountCounter = new Counter();
+ this._amountCounter = new Counter();
_amountCounter.Value = 0;
_ending = null;
_heading = null;
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/PointContainer.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/PointContainer.cs
index 584261aa..4325d4e2 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/PointContainer.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/PointContainer.cs
@@ -7,14 +7,14 @@ using System.Threading.Tasks;
namespace StgSharp.Logic
{
- internal class PointContainer : LinkedList
+ internal class PointContainer : LinkedList, IContainer
{
- private Counter _limit;
private float _leftBorder;
private float _rightBorder;
private float _topBorder;
private float _bottomBorder;
- private LinkedList _container;
+
+ private int _limit;
public float LeftBorder
{
@@ -37,30 +37,11 @@ namespace StgSharp.Logic
set { _bottomBorder = value; }
}
- public LinkedList Container
+ public int Limit
{
- get { return _container; }
- set { _container = value; }
- }
-
-
- public void Add(LinkedObject t)
- {
- if (true) //对target类型进行判断,应当只是实体
- {
- _container.Add(t);
- }
- }
-
- public void RemoveAt(int id)
- {
- _container.Remove(id);
- }
-
- public PointContainer(Counter counter)
- {
- this._limit = counter;
- this.Container = new LinkedList(_limit);
+ get { return _limit; }
+ set { _limit = value; }
}
+
}
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj
index bf61f00d..bc15133b 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj
@@ -46,10 +46,11 @@
+
-
-
+
+
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/bin/Debug/StgSharp.dll b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/bin/Debug/StgSharp.dll
index b60a0132..e73313dc 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/bin/Debug/StgSharp.dll and b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/bin/Debug/StgSharp.dll differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/bin/Debug/StgSharp.pdb b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/bin/Debug/StgSharp.pdb
index ebe7255d..9c40f9a9 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/bin/Debug/StgSharp.pdb and b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/bin/Debug/StgSharp.pdb differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.csproj.CoreCompileInputs.cache b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.csproj.CoreCompileInputs.cache
index af3dd6ab..aab752e7 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.csproj.CoreCompileInputs.cache
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-9cd073825ba9a2a4cf5ce2e7b5c36ea49b8f1483
+ad761ca55fb448d4a1c942b7a73d038bfb5ad3dc
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.dll b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.dll
index b60a0132..e73313dc 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.dll and b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.dll differ
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.pdb b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.pdb
index ebe7255d..9c40f9a9 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.pdb and b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/StgSharp.pdb differ