diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/3171f494-7802-486e-87b1-e898238936fb.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/3171f494-7802-486e-87b1-e898238936fb.vsidx new file mode 100644 index 00000000..7f7d9612 Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/3171f494-7802-486e-87b1-e898238936fb.vsidx differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/3f6f6bc5-ce17-45c0-9876-7e489ce728aa.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/3f6f6bc5-ce17-45c0-9876-7e489ce728aa.vsidx deleted file mode 100644 index c808dbfa..00000000 Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/3f6f6bc5-ce17-45c0-9876-7e489ce728aa.vsidx and /dev/null differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/4ba93158-180e-4592-bddc-9e888cd30b8e.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/4ba93158-180e-4592-bddc-9e888cd30b8e.vsidx deleted file mode 100644 index 71fefe3d..00000000 Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/4ba93158-180e-4592-bddc-9e888cd30b8e.vsidx and /dev/null differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/cb931ce2-7bd0-4c66-acec-2d4d11008b4e.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/cb931ce2-7bd0-4c66-acec-2d4d11008b4e.vsidx deleted file mode 100644 index c3d7d74c..00000000 Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/cb931ce2-7bd0-4c66-acec-2d4d11008b4e.vsidx and /dev/null differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/cf6c5db5-7303-4785-b356-936e4ee484ca.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/cf6c5db5-7303-4785-b356-936e4ee484ca.vsidx new file mode 100644 index 00000000..686fd024 Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/cf6c5db5-7303-4785-b356-936e4ee484ca.vsidx differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/dd61abb7-a480-4b18-8c49-074e9c0c8d37.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/dd61abb7-a480-4b18-8c49-074e9c0c8d37.vsidx new file mode 100644 index 00000000..3a2548cc Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/dd61abb7-a480-4b18-8c49-074e9c0c8d37.vsidx differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/v17/.suo b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/v17/.suo index ad922863..15e6fd69 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 afef40e0..cf41450d 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Create.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Create.cs @@ -1,7 +1,6 @@ using StgSharp.Entity; using StgSharp.Geometry; using StgSharp.Logic; -using StgSharp.Pool; using System; using System.Collections.Generic; using System.Linq; @@ -17,7 +16,7 @@ namespace StgSharp.Control private static LinkedObject cache; - public static void Geometry(IPoint center, float radius, float angle, int num) + public static void Geometry(Point center, float radius, float angle, int num) { } @@ -26,7 +25,7 @@ namespace StgSharp.Control /// 创建一个子弹并将其绑定在一个指定的点上 /// /// - public static void Bullet(IPoint point) + public static void Bullet(Point point) { Pool.bulletContainer.Add(new Bullet(point)); } @@ -47,7 +46,7 @@ namespace StgSharp.Control for (int i = begin; i < end; i++) { cache--; - Pool.bulletContainer.Add(new Bullet(cache as IPoint)); + Pool.bulletContainer.Add(new Bullet(cache as Point)); } } @@ -95,7 +94,7 @@ namespace StgSharp.Control } - public static void Circle(IPoint c, float r) + public static void Circle(Point c, float r) { } } diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs index 0216e482..480a4189 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs @@ -1,5 +1,6 @@ -using StgSharp.Logic; -using StgSharp.Pool; +using StgSharp.Entity; +using StgSharp.Geometry; +using StgSharp.Logic; using System; using System.Collections.Generic; using System.Linq; @@ -14,43 +15,47 @@ namespace StgSharp.Control public static Counter tickCounter = new Counter(); - internal static Collector topCollector - =new Collector(side.top,1000); - internal static Collector bottomCollector - =new Collector(side.bottom,-1000); - internal static Collector leftCollector - = new Collector(side.left, -600); - internal static Collector rightCollector - = new Collector(side.right,600); - - - internal static Counter entityCounter + internal static Counter collectCounter =new Counter(); - internal static LinkedList entityContainer - = new LinkedList(entityCounter); + internal static Logic.LinkedList topCollector + = new Logic.LinkedList(collectCounter); + internal static Logic.LinkedList bottomCollector + =new Logic.LinkedList(collectCounter); + internal static Logic.LinkedList leftCollector + =new Logic.LinkedList(collectCounter); + internal static Logic.LinkedList rightCollector + = new Logic.LinkedList(collectCounter); internal static Counter bulletCounter =new Counter(); - internal static LinkedList bulletContainer - = new LinkedList(bulletCounter); + internal static Logic.LinkedList bulletContainer + = new Logic.LinkedList(bulletCounter); + + internal static Counter entityCounter + =new Counter(); + internal static Logic.LinkedList entityContainer + = new Logic.LinkedList(entityCounter); internal static Counter gemoetryCounter =new Counter(); - internal static LinkedList geometryContainer - = new LinkedList(gemoetryCounter); + internal static Logic.LinkedList geometryContainer + = new Logic.LinkedList(gemoetryCounter); internal static Counter pointCounter =new Counter(); - internal static LinkedList pointContainer - = new LinkedList(pointCounter); + internal static Logic.LinkedList pointContainer + = new Logic.LinkedList(pointCounter); static Pool() { } - public static void Creat() + + + public static void OnRender() { + } } diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Bullet.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Bullet.cs index 99fb38b2..53db4aa2 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Bullet.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Bullet.cs @@ -10,9 +10,9 @@ namespace StgSharp.Entity { public class Bullet : LinkedObject { - internal IPoint _location; + internal Point _location; - public IPoint Location + public Point Location { get { return _location; } set { _location = value; } @@ -41,7 +41,7 @@ namespace StgSharp.Entity set { _radius = value; } } - public Bullet(IPoint p) + public Bullet(Point p) { _location = p; } diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Entity.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Entity.cs new file mode 100644 index 00000000..c2d860aa --- /dev/null +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entity/Entity.cs @@ -0,0 +1,14 @@ +using StgSharp.Logic; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Entity +{ + internal class Entity:LinkedObject + { + + } +} diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Circle.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Circle.cs index 533ae531..01b70d9f 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Circle.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Circle.cs @@ -8,17 +8,17 @@ using System.Threading.Tasks; namespace StgSharp.Geometry { - public unsafe class Circle :LinkedObject, IGeometry + public unsafe class Circle :Geometry { - private IPoint _center; + private Point _center; - public IPoint Center + public Point Center { get { return _center; } set { _center = value; } } - internal IPoint _bindPoint; + internal Point _bindPoint; private float _radius; public float Radius @@ -87,7 +87,7 @@ namespace StgSharp.Geometry /// 圆心 /// 半径 /// 游戏刻计数器 - public Circle(IPoint center, float radius,Counter counter) + public Circle(Point center, float radius,Counter counter) { this._center = center; this._radius = radius; @@ -106,7 +106,7 @@ namespace StgSharp.Geometry /// 游戏刻计数器 /// 半径的时间函数 /// 角速度时间函数 - public Circle(IPoint center, float radius, Counter counter, float[] rFunc, float[] roFunc) + public Circle(Point center, float radius, Counter counter, float[] rFunc, float[] roFunc) { this._center = center; this._radius = radius; @@ -123,7 +123,7 @@ namespace StgSharp.Geometry /// /// 作为圆心的点 /// 在圆周上的点 - public Circle(IPoint c,IPoint b) + public Circle(Point c,Point b) { this._center = c; this. _bindPoint = b; @@ -141,22 +141,13 @@ namespace StgSharp.Geometry } } - public void Add(float angle,uint number,GeometryContainer geometryPool) - { - PointOnCircle p; - for (int i = 0; i < number; i++) - { - p = new PointOnCircle(this, angle, number); - geometryPool.Add(p); - } - } /// /// 将圆心绑定到一个新的点上; /// /// 想要绑定的圆心 - public void Bind(IPoint p) + public void Bind(Point p) { _center = p; } diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/FreeCurve.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/FreeCurve.cs index 6adec702..b7918ded 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/FreeCurve.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/FreeCurve.cs @@ -8,10 +8,10 @@ using System.Threading.Tasks; namespace StgSharp.Geometry { - internal class FreeCurve : LinkedObject, IGeometry + internal class FreeCurve : Geometry { - private IPoint _center; + private Point _center; private float[] _xExpression; private float[] _yExpression; @@ -28,7 +28,7 @@ namespace StgSharp.Geometry } - public IPoint Center + public Point Center { get { return _center; } set { _center = value; } @@ -38,7 +38,7 @@ namespace StgSharp.Geometry - public FreeCurve(IPoint c, float[] x, float[] y) + public FreeCurve(Point c, float[] x, float[] y) { if (x.Length==10) { @@ -59,7 +59,7 @@ namespace StgSharp.Geometry } } - public void Bind(IPoint p) + public void Bind(Point p) { _center = p; } diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Geometry.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Geometry.cs new file mode 100644 index 00000000..70453860 --- /dev/null +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Geometry.cs @@ -0,0 +1,21 @@ +using StgSharp.Logic; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Geometry +{ + public class Geometry:LinkedObject + { + public static Geometry operator ++(Geometry g) + { + return g.Next as Geometry; + } + public static Geometry operator --(Geometry g) + { + return g.Previous as Geometry; + } + } +} diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/IGeometry.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/IGeometry.cs deleted file mode 100644 index 6b340875..00000000 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/IGeometry.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Geometry -{ - public interface IGeometry - { - - - void Bind(IPoint p); - - void OnRender(); - - event ComplexOperationHandler ComplexOperation; - } - -} diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/IPoint.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/IPoint.cs deleted file mode 100644 index e8409510..00000000 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/IPoint.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Geometry -{ - public interface IPoint - { - float X { get; set; } - - float Y { get; set; } - - float Angle { get; set; } - - void OnRender(); - } - - abstract class a - { - - } -} diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Line.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Line.cs index 8313c628..917e1fd9 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Line.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/Line.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; namespace StgSharp.Geometry { - public class Line:LinkedObject,IGeometry + public class Line:Geometry { - private IPoint _beginPoint; + private Point _beginPoint; - public IPoint BeginPoint + public Point BeginPoint { get { return _beginPoint; } set { _beginPoint = value; } } - private IPoint _endingPoint; + private Point _endingPoint; - public IPoint EndingPoint + public Point EndingPoint { get { return _endingPoint; } set { _endingPoint = value; } @@ -51,27 +51,13 @@ namespace StgSharp.Geometry /// /// /// - public Line(IPoint begin, IPoint end) + public Line(Point begin, Point end) { _beginPoint = begin; _endingPoint = end; } - public void AddPoint(float step,GeometryContainer geometryPool) - { - if(step < _length) - { - PointOnLine p; - - int number = (int)(_length / step); - for (int i = 0; i /// @@ -57,7 +35,7 @@ namespace StgSharp.Geometry } - public void OnRender() + public override void OnRender() { _angle = _angle0 + _bindedItem.Angle; this._x = (float)(_bindedItem.Center.X + _bindedItem.Radius * Math.Cos(_angle)); diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnLine.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnLine.cs index 26de19c2..f499dc04 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnLine.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Geometry/PointOnLine.cs @@ -8,51 +8,29 @@ using System.Threading.Tasks; namespace StgSharp.Geometry { - public class PointOnLine : LinkedObject, IPoint + public class PointOnLine : Point { - private IPoint _beginPoint; + private Point _beginPoint; - public IPoint BeginPoint + public Point BeginPoint { get { return _beginPoint; } set { _beginPoint = value; } } - private IPoint _endPoint; + private Point _endPoint; - public IPoint EndPoint + public Point EndPoint { get { return _endPoint; } set { _endPoint = value; } } - protected float _x; - public float X - { - get { return _x; } - set { _x = value; } - } - - protected float _y; - - public float Y - { - get { return _y; } - set { _y = value; } - } - - private float _angle; - - public float Angle - { - get { return _angle; } - set { _angle = value; } - } private float _rate; - public PointOnLine(IPoint beginPoint, IPoint endPoint, float rate, int number) + public PointOnLine(Point beginPoint, Point endPoint, float rate, int number) { _beginPoint = beginPoint; _endPoint = endPoint; @@ -64,7 +42,7 @@ namespace StgSharp.Geometry this._x = beginPoint.X + rate * (endPoint.X - beginPoint.X); } - public void OnRender() + public override void OnRender() { _angle = (float)(Math.Atan2(_endPoint.Y - _beginPoint.Y, _endPoint.X - _beginPoint.Y)); diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/IContainer.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/IContainer.cs deleted file mode 100644 index 7d72d923..00000000 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/IContainer.cs +++ /dev/null @@ -1,32 +0,0 @@ -using StgSharp.Pool; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Logic -{ - public interface IContainer - { - float LeftBorder { get; set; } - - float RightBorder { get; set; } - - float TopBorder { get; set; } - - float BottomBorder { get; set; } - - int Limit { get; set; } - - IContainer Top { get; set; } - - IContainer Bottom { get; set; } - - IContainer Left { get; set; } - - IContainer Right { get; set; } - - void Add(LinkedObject o); - } -} diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/LinkedList.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/LinkedList.cs index 83f71c1b..bf136a27 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/LinkedList.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Logic/LinkedList.cs @@ -6,25 +6,25 @@ using System.Threading.Tasks; namespace StgSharp.Logic { - public class LinkedList + public class LinkedList where T : LinkedObject { - protected LinkedObject _heading = null; - protected LinkedObject _ending; - protected LinkedObject _cache; + protected T _heading = null; + protected T _ending; + protected T _cache; protected Counter _amountCounter; - public virtual LinkedObject Heading + public virtual T Heading { get { return _heading; } set { _heading = value; } } - public virtual LinkedObject Ending + public virtual T Ending { get { return _ending; } set { _ending = value; } } - public LinkedObject Cache + public T Cache { get { return _cache; } set { _cache = value; } @@ -47,7 +47,7 @@ namespace StgSharp.Logic } - public void Add(LinkedObject target) + public void Add(T target) { if (_ending != null) { @@ -74,7 +74,7 @@ namespace StgSharp.Logic _cache = null; for (int i = 1; i < id; i++) { - _cache = _cache.Next; + _cache = _cache.Next as T; } _cache.Previous = _cache.Next; _cache.Next = _cache.Previous; @@ -87,7 +87,7 @@ namespace StgSharp.Logic /// 快速删除链表中已知名称的一个实例。由于不能判别实例是否存在于链表中故安全性较低。在对安全性有要求的情况下应当使用Remove_s方法。 /// /// - public void Remove(LinkedObject target) + public void Remove(T target) { target.Previous = target.Next; target.Next = target.Previous; @@ -103,7 +103,7 @@ namespace StgSharp.Logic /// /// /// - public void Remove_s(LinkedObject target) + public void Remove_s(T target) { bool a = true; _cache = _heading; diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/Collector.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/Collector.cs deleted file mode 100644 index 51228ac1..00000000 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/Collector.cs +++ /dev/null @@ -1,121 +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 class Collector : LinkedList, IContainer - { - - private readonly float _topBorder; - private readonly float _bottomBorder; - private readonly float _leftBorder; - private readonly float _rightBorder; - - private readonly IContainer _top; - private readonly IContainer _bottom; - private readonly IContainer _left; - private readonly IContainer _right; - - private readonly Counter _counter; - - private readonly int _limit; - - public float TopBorder - { - get { return _topBorder; } - set { } - } - - public float BottomBorder - { - get { return _bottomBorder; } - set { } - } - - public float LeftBorder - { - get { return _leftBorder; } - set { } - } - - public float RightBorder - { - get { return _rightBorder; } - set { } - } - - public IContainer Top - { - get { return _top; } - set { } - } - - public IContainer Bottom - { - get { return _bottom; } - set { } - } - - public IContainer Left - { - get { return _left; } - set { } - } - - public IContainer Right - { - get { return _right; } - set { } - } - - public Counter Counter - { - get; - set; - } - - public int Limit - { - get { return _limit; } - set { } - } - - public Collector(side s,float b) - { - switch (s) - { - case side.top: - _bottomBorder = b; - break; - case side.bottom: - _topBorder = b; - break; - case side.left: - _rightBorder = b; - break; - case side.right: - _leftBorder = b; - break; - default: - break; - } - - - - } - - - } - - public enum side - { - top, - bottom, - left, - right, - } -} diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/EntityContainer.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/EntityContainer.cs deleted file mode 100644 index 2e73a6f8..00000000 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/EntityContainer.cs +++ /dev/null @@ -1,111 +0,0 @@ -using StgSharp.Pool; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Logic -{ - internal class EntityContainer:LinkedList,IContainer - { - - private int _limit; - protected float _leftBorder; - protected float _rightBorder; - protected float _topBorder; - protected float _bottomBorder; - - public int Limit - { - get { return _limit; } - set { _limit = value; } - } - - public float LeftBorder - { - get { return _leftBorder; } - set { _leftBorder = value; } - } - public float RightBorder - { - get { return _rightBorder; } - set { _rightBorder = value; } - } - public float TopBorder - { - get { return _topBorder; } - set { _topBorder = value; } - } - public float BottomBorder - { - get { return _bottomBorder; } - set { _bottomBorder = value; } - } - - public static IContainer _top; - public static IContainer _bottom; - public static IContainer _left; - public static IContainer _right; - - public IContainer Top - { - get { return _top; } - set { } - } - public IContainer Bottom - { - get { return _bottom; } - set { } - } - public IContainer Left - { - get { return _left; } - set { } - } - public IContainer Right - { - get { return _right; } - set { } - } - - public EntityContainer(float top,float bottom,float left,float right) - { - _topBorder = top; - _bottomBorder = bottom; - _leftBorder = left; - _rightBorder = right; - this._amountCounter = new Counter(); - _amountCounter.Value = 0; - _heading = null; - } - - public EntityContainer(IContainer t, IContainer b, IContainer l, IContainer r) - { - _top = t; - _topBorder = t.BottomBorder; - - _bottom = b; - _bottomBorder = b.TopBorder; - - _left= l; - _leftBorder = l.RightBorder; - - _right = r; - _rightBorder = r.LeftBorder; - } - - //What should a container do on each rendering frame - //This method should be overriden - public void OnRender() - { - //坐标刷新 - //边界判定 - //碰撞判定 - } - - - - } -} diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/GeometryContainer.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/GeometryContainer.cs deleted file mode 100644 index 948dfe25..00000000 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/GeometryContainer.cs +++ /dev/null @@ -1,104 +0,0 @@ -using StgSharp.Geometry; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Logic -{ - public class GeometryContainer:LinkedList,IContainer - { - - - private float _leftBorder; - - public float LeftBorder - { - get { return _leftBorder; } - set { _leftBorder = value; } - } - - private float _rightBorder; - - public float RightBorder - { - get { return _rightBorder; } - set { _rightBorder = value; } - } - - private float _topBorder; - - public float TopBorder - { - get { return _topBorder; } - set { _topBorder = value; } - } - - private float _bottomBorder; - - public float BottomBorder - { - get { return _bottomBorder; } - set { _bottomBorder = value; } - } - - private int _limit; - - - private IContainer _top; - private IContainer _bottom; - private IContainer _left; - private IContainer _right; - - - public IContainer Top - { - get { return _top; } - set { _top = value; } - } - - public IContainer Left - { - get { return _left; } - set { _left = value; } - } - - public IContainer Right - { - get { return _right; } - set { _right = value; } - } - - public IContainer Bottom - { - get { return _bottom; } - set { _bottom = value; } - } - - public int Limit - { - get { return _limit; } - set { _limit = value; } - } - - 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 deleted file mode 100644 index 72fdec9a..00000000 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Pool/PointContainer.cs +++ /dev/null @@ -1,93 +0,0 @@ -using StgSharp.Geometry; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Logic -{ - internal class PointContainer : LinkedList, IContainer - { - private float _leftBorder; - private float _rightBorder; - private float _topBorder; - private float _bottomBorder; - - private IContainer _left; - private IContainer _right; - private IContainer _top; - private IContainer _bottom; - - private int _limit; - - public float LeftBorder - { - get { return _leftBorder; } - set { _leftBorder = value; } - } - public float RightBorder - { - get { return _rightBorder; } - set { _rightBorder = value; } - } - public float TopBorder - { - get { return _topBorder; } - set { _topBorder = value; } - } - public float BottomBorder - { - get { return _bottomBorder; } - set { _bottomBorder = value; } - } - - public IContainer Left - { - get { return _left; } - set { _left = value; } - } - - public IContainer Right - { - get { return _right; } - set { _right = value; } - } - - public IContainer Top - { - get { return _top; } - set { _top = value; } - } - - public IContainer Bottom - { - get { return _bottom; } - set { _bottom = value; } - } - - public int Limit - { - get { return _limit; } - set { _limit = value; } - } - - - public PointContainer(float top,float bottom,float left,float right) - { - _topBorder = top; - _bottomBorder = bottom; - _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/StgSharp.csproj b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj index caebb3e2..1ed11673 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj @@ -48,17 +48,15 @@ + + - - + - - - @@ -67,8 +65,6 @@ - -