diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/0a2c7a92-eff0-4816-a47e-8d884bcc0d43.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/0a2c7a92-eff0-4816-a47e-8d884bcc0d43.vsidx
new file mode 100644
index 00000000..f1b523cd
Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/0a2c7a92-eff0-4816-a47e-8d884bcc0d43.vsidx differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/2610d520-9e62-496b-8afd-b26efd75bf79.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/2610d520-9e62-496b-8afd-b26efd75bf79.vsidx
new file mode 100644
index 00000000..b5179b29
Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/2610d520-9e62-496b-8afd-b26efd75bf79.vsidx differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/2ff6cc83-13cd-4f78-8650-81b973c5172b.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/2ff6cc83-13cd-4f78-8650-81b973c5172b.vsidx
deleted file mode 100644
index b4ed1787..00000000
Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/2ff6cc83-13cd-4f78-8650-81b973c5172b.vsidx and /dev/null differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/34087db9-8236-4ca5-8742-f1dbddcd66b9.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/34087db9-8236-4ca5-8742-f1dbddcd66b9.vsidx
deleted file mode 100644
index 56a7c280..00000000
Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/34087db9-8236-4ca5-8742-f1dbddcd66b9.vsidx and /dev/null differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/6dab91eb-fca0-439f-802d-3e6ec32245bd.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/6dab91eb-fca0-439f-802d-3e6ec32245bd.vsidx
new file mode 100644
index 00000000..66e7be2f
Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/6dab91eb-fca0-439f-802d-3e6ec32245bd.vsidx differ
diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/84e4c80f-97e3-4959-bce2-39a1609ef9f4.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/84e4c80f-97e3-4959-bce2-39a1609ef9f4.vsidx
deleted file mode 100644
index be9c38c2..00000000
Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/84e4c80f-97e3-4959-bce2-39a1609ef9f4.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 b25e3899..84aac3a0 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/Stg_Sharp/Control/Create.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Create.cs
index cb8b2c13..497740b1 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Create.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Create.cs
@@ -28,7 +28,7 @@ namespace StgSharp.Control
///
public static void Bullet(IPoint point)
{
- BulletPool.mainContainer.Add(new Bullet(point));
+ Pool.bulletContainer.Add(new Bullet(point));
}
///
@@ -39,7 +39,7 @@ namespace StgSharp.Control
/// 终点序号
public static void Bullet(int begin, int end)
{
- cache = PointPool.mainCotainer.Ending;
+ cache = Pool.pointContainer.Ending;
for (int i = 1; i < begin; i++)
{
cache--;
@@ -47,7 +47,7 @@ namespace StgSharp.Control
for (int i = begin; i < end; i++)
{
cache--;
- BulletPool.mainContainer.Add(new Bullet(cache as IPoint));
+ Pool.bulletContainer.Add(new Bullet(cache as IPoint));
}
}
@@ -60,7 +60,7 @@ namespace StgSharp.Control
///
public static void Bullet(int order,uint count,float angle)
{
- cache=PointPool.mainCotainer.Ending;
+ cache=Pool.pointContainer.Ending;
for (int i = 1; i < count; i++)
{
cache--;
@@ -68,8 +68,8 @@ namespace StgSharp.Control
for (uint i = 0; i < count; i++)
{
PointOnCircle p = new PointOnCircle(cache as Circle, angle, i);
- PointPool.mainCotainer.Add(p);
- BulletPool.mainContainer.Add(new Bullet(p));
+ Pool.pointContainer.Add(p);
+ Pool.bulletContainer.Add(new Bullet(p));
}
}
@@ -79,7 +79,7 @@ namespace StgSharp.Control
///
- /// 创建一个简单点,并设置其
+ /// 创建一个简单点,并设置其速度和初始角度
///
///
///
@@ -91,8 +91,13 @@ namespace StgSharp.Control
PointCommon p = new PointCommon(beginX, beginY, angle,Pool.tickCounter);
p.XVelocity = x;
p.YVelocity = y;
- PointPool.mainCotainer.Add(p);
+ Pool.pointPool.mainCotainer.Add(p);
}
+
+ public static void Circle(IPoint c, float r)
+ {
+ Pool.
+ }
}
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs
index f44f8877..dfa8d979 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs
@@ -24,12 +24,18 @@ namespace StgSharp.Control
= new Collector(side.right,600);
- internal static IPool pointPool
- = new PointPool(topCollector,bottomCollector,leftCollector,rightCollector) ;
+ internal static IContainer entityContainer
+ = new EntityContainer(topCollector,bottomCollector,leftCollector,rightCollector) ;
- internal static IPool bulletPool
- = new BulletPool(topCollector, bottomCollector, leftCollector, rightCollector);
+ internal static IContainer bulletContainer
+ = new EntityContainer(topCollector, bottomCollector, leftCollector, rightCollector);
+ internal static IContainer geometryContainer
+ = new GeometryContainer(topCollector, bottomCollector, leftCollector, rightCollector) ;
+
+ internal static IContainer pointContainer
+ = new PointContainer(topCollector, bottomCollector, leftCollector, rightCollector) ;
+
static Pool()
{
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/IPool.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/IPool.cs
deleted file mode 100644
index 08620fe6..00000000
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/IPool.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using StgSharp.Logic;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace StgSharp.Pool
-{
- public interface IPool
- {
- IContainer TopCollector { get; }
- IContainer BottomCollector { get; }
- IContainer LeftCollector { get; }
- IContainer RightCollector { get; }
- }
-}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/BulletPool.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/BulletPool.cs
deleted file mode 100644
index c3f576c4..00000000
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/BulletPool.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-using StgSharp.Entity;
-using StgSharp.Logic;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net.Http.Headers;
-using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace StgSharp.Pool
-{
- public class BulletPool:IPool
- {
-
- internal static IContainer _topCollector;
- internal static IContainer _bottomCollector;
- internal static IContainer _leftCollector;
- internal static IContainer _rightCollector;
-
- public IContainer TopCollector
- {
- get { return _topCollector; }
- }
-
- public IContainer BottomCollector
- {
- get { return _bottomCollector; }
- }
-
- public IContainer LeftCollector
- {
- get { return _leftCollector; }
- }
-
- public IContainer RightCollector
- {
- get { return _rightCollector; }
- }
-
-
- //用一个实体容器存放各种各样的实体,太不安全了,
- //写这种代码的人是个大SB。
- internal static EntityContainer mainContainer;
- internal static EntityContainer grazeContainer;
-
-
- public BulletPool(Collector t, Collector b, Collector l, Collector r)
- {
- mainContainer = new EntityContainer(1000,-1000,-600,600);
-
- grazeContainer = new EntityContainer(1000,400,-150,150);
-
- mainContainer.Top = _topCollector;
- mainContainer.Bottom = _bottomCollector;
- mainContainer.Left = _leftCollector;
- mainContainer.Right = _rightCollector;
-
- grazeContainer.Top = mainContainer;
- grazeContainer.Bottom = mainContainer;
- grazeContainer.Left = mainContainer;
- grazeContainer.Right = mainContainer;
-
- _topCollector = t;
- _bottomCollector = b;
- _leftCollector = l;
- _rightCollector = r;
- }
-
- protected static Bullet cache;
-
- public static void OnRender()
- {
- Bullet end=grazeContainer.Ending as Bullet;
- if (end != null)
- {
- cache = grazeContainer.Heading as Bullet;
- do
- {
- if ( cache.X + cache.Radius < grazeContainer.LeftBorder
- || cache.X - cache.Radius < grazeContainer.RightBorder
- || cache.Y + cache.Radius < grazeContainer.TopBorder
- || cache.Y - cache.Radius < grazeContainer.RightBorder)
- {
- grazeContainer.Remove(cache);
- }
-
- cache = cache.Next as Bullet;
-
- } while (true);
- }
-
-
- end=mainContainer.Ending as Bullet;
- if (end != null)
- {
-
- cache = mainContainer.Heading as Bullet;
- do
- {
- if (cache.X - cache.Radius < grazeContainer.LeftBorder
- || cache.X + cache.Radius < grazeContainer.RightBorder
- || cache.Y - cache.Radius < grazeContainer.TopBorder
- || cache.Y + cache.Radius < grazeContainer.RightBorder)
- {
- grazeContainer.Add(cache);
- }
-
- cache = cache.Next as Bullet;
-
- } while (cache == end);
-
-
-
- }
- }
-
- ///
- /// 所有需要添加的功能应当写在这里
- ///
- public virtual void ExtendRender()
- {
-
- }
- }
-}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/GeometryContainer.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/GeometryContainer.cs
index 1b6cb88f..948dfe25 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/GeometryContainer.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/GeometryContainer.cs
@@ -82,9 +82,17 @@ namespace StgSharp.Logic
set { _limit = value; }
}
- public GeometryContainer()
+ public GeometryContainer(IContainer t, IContainer b, IContainer l, IContainer r)
{
+ _top = t;
+ _bottom = b;
+ _left = l;
+ _right = r;
+ _topBorder=t.BottomBorder;
+ _bottomBorder=b.TopBorder;
+ _leftBorder=l.RightBorder;
+ _rightBorder=r.LeftBorder;
}
public void OnRender()
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/PointContainer.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/PointContainer.cs
index 3b6f5e8d..72fdec9a 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/PointContainer.cs
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/PointContainer.cs
@@ -80,6 +80,14 @@ namespace StgSharp.Logic
_leftBorder = left;
_rightBorder = right;
}
+
+ public PointContainer(IContainer t,IContainer b,IContainer l,IContainer r)
+ {
+ _top = t;
+ _bottom = b;
+ _left = l;
+ _right = r;
+ }
}
}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/PointPool.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/PointPool.cs
deleted file mode 100644
index 392b5f6b..00000000
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/PointPool.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using StgSharp.Logic;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace StgSharp.Pool
-{
- internal class PointPool:IPool
- {
- public static IContainer _topContainer;
- public static IContainer _bottomContainer;
- public static IContainer _leftContainer;
- public static IContainer _rightContainer;
-
- public IContainer TopCollector
- {
- get { return _topContainer; }
- }
-
- public IContainer BottomCollector
- {
- get { return _bottomContainer; }
- }
-
- public IContainer LeftCollector
- {
- get { return _leftContainer; }
- }
-
- public IContainer RightCollector
- {
- get { return _rightContainer; }
- }
-
- public static EntityContainer mainCotainer
- = new EntityContainer(1000,-1000,-600,600);
-
- public PointPool(Collector t, Collector b, Collector l, Collector r)
- {
- _topContainer= t;
- _bottomContainer= b;
- _leftContainer= l;
- _rightContainer= r;
- }
- }
-}
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj
index 45017c58..caebb3e2 100644
--- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj
+++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj
@@ -57,11 +57,8 @@
-
-
-
diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index a89f7712..040900f6 100644
Binary files a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ