diff --git a/源代码/.Net/.vs/ProjectEvaluation/stgsharp.metadata.v5.1 b/源代码/.Net/.vs/ProjectEvaluation/stgsharp.metadata.v5.1 index 019e9dc0..f57961da 100644 Binary files a/源代码/.Net/.vs/ProjectEvaluation/stgsharp.metadata.v5.1 and b/源代码/.Net/.vs/ProjectEvaluation/stgsharp.metadata.v5.1 differ diff --git a/源代码/.Net/.vs/ProjectEvaluation/stgsharp.projects.v5.1 b/源代码/.Net/.vs/ProjectEvaluation/stgsharp.projects.v5.1 index e7fa74ff..9b61b25a 100644 Binary files a/源代码/.Net/.vs/ProjectEvaluation/stgsharp.projects.v5.1 and b/源代码/.Net/.vs/ProjectEvaluation/stgsharp.projects.v5.1 differ diff --git a/源代码/.Net/.vs/StgSharp/DesignTimeBuild/.dtbcache.v2 b/源代码/.Net/.vs/StgSharp/DesignTimeBuild/.dtbcache.v2 index 6e1ab322..2ff2a754 100644 Binary files a/源代码/.Net/.vs/StgSharp/DesignTimeBuild/.dtbcache.v2 and b/源代码/.Net/.vs/StgSharp/DesignTimeBuild/.dtbcache.v2 differ diff --git a/源代码/.Net/.vs/StgSharp/FileContentIndex/2c35414f-5770-455f-9660-28f7620005cb.vsidx b/源代码/.Net/.vs/StgSharp/FileContentIndex/2c35414f-5770-455f-9660-28f7620005cb.vsidx deleted file mode 100644 index 5f961406..00000000 Binary files a/源代码/.Net/.vs/StgSharp/FileContentIndex/2c35414f-5770-455f-9660-28f7620005cb.vsidx and /dev/null differ diff --git a/源代码/.Net/.vs/StgSharp/FileContentIndex/3427851d-bb85-4067-9d05-16b999850d69.vsidx b/源代码/.Net/.vs/StgSharp/FileContentIndex/3427851d-bb85-4067-9d05-16b999850d69.vsidx new file mode 100644 index 00000000..7089875f Binary files /dev/null and b/源代码/.Net/.vs/StgSharp/FileContentIndex/3427851d-bb85-4067-9d05-16b999850d69.vsidx differ diff --git a/源代码/.Net/.vs/StgSharp/FileContentIndex/3b195591-63d0-434b-8746-2fda245ab335.vsidx b/源代码/.Net/.vs/StgSharp/FileContentIndex/3b195591-63d0-434b-8746-2fda245ab335.vsidx deleted file mode 100644 index 0f5023be..00000000 Binary files a/源代码/.Net/.vs/StgSharp/FileContentIndex/3b195591-63d0-434b-8746-2fda245ab335.vsidx and /dev/null differ diff --git a/源代码/.Net/.vs/StgSharp/FileContentIndex/5827c9b3-f906-4171-97d3-fe981c49200b.vsidx b/源代码/.Net/.vs/StgSharp/FileContentIndex/5827c9b3-f906-4171-97d3-fe981c49200b.vsidx new file mode 100644 index 00000000..632c1cb4 Binary files /dev/null and b/源代码/.Net/.vs/StgSharp/FileContentIndex/5827c9b3-f906-4171-97d3-fe981c49200b.vsidx differ diff --git a/源代码/.Net/.vs/StgSharp/FileContentIndex/a2839610-790d-4ea6-9b2e-aeee7a27b2cd.vsidx b/源代码/.Net/.vs/StgSharp/FileContentIndex/a2839610-790d-4ea6-9b2e-aeee7a27b2cd.vsidx deleted file mode 100644 index a87f12d7..00000000 Binary files a/源代码/.Net/.vs/StgSharp/FileContentIndex/a2839610-790d-4ea6-9b2e-aeee7a27b2cd.vsidx and /dev/null differ diff --git a/源代码/.Net/.vs/StgSharp/FileContentIndex/d53b70bf-b92a-4294-b1f1-07b9781abec5.vsidx b/源代码/.Net/.vs/StgSharp/FileContentIndex/d53b70bf-b92a-4294-b1f1-07b9781abec5.vsidx deleted file mode 100644 index e23f919b..00000000 Binary files a/源代码/.Net/.vs/StgSharp/FileContentIndex/d53b70bf-b92a-4294-b1f1-07b9781abec5.vsidx and /dev/null differ diff --git a/源代码/.Net/.vs/StgSharp/FileContentIndex/ed45ff66-6b26-4cd1-9976-57033713d5a5.vsidx b/源代码/.Net/.vs/StgSharp/FileContentIndex/ed45ff66-6b26-4cd1-9976-57033713d5a5.vsidx new file mode 100644 index 00000000..2b591ea4 Binary files /dev/null and b/源代码/.Net/.vs/StgSharp/FileContentIndex/ed45ff66-6b26-4cd1-9976-57033713d5a5.vsidx differ diff --git a/源代码/.Net/.vs/StgSharp/FileContentIndex/f1643188-5845-45e6-b42e-44af5ba3be6f.vsidx b/源代码/.Net/.vs/StgSharp/FileContentIndex/f1643188-5845-45e6-b42e-44af5ba3be6f.vsidx new file mode 100644 index 00000000..4c41251f Binary files /dev/null and b/源代码/.Net/.vs/StgSharp/FileContentIndex/f1643188-5845-45e6-b42e-44af5ba3be6f.vsidx differ diff --git a/源代码/.Net/.vs/StgSharp/v17/.futdcache.v2 b/源代码/.Net/.vs/StgSharp/v17/.futdcache.v2 index 519741cd..dfbfdc68 100644 Binary files a/源代码/.Net/.vs/StgSharp/v17/.futdcache.v2 and b/源代码/.Net/.vs/StgSharp/v17/.futdcache.v2 differ diff --git a/源代码/.Net/.vs/StgSharp/v17/.suo b/源代码/.Net/.vs/StgSharp/v17/.suo index bf007a94..94e8a2fc 100644 Binary files a/源代码/.Net/.vs/StgSharp/v17/.suo and b/源代码/.Net/.vs/StgSharp/v17/.suo differ diff --git a/源代码/.Net/StgSharp/Entities/IEntity.cs b/源代码/.Net/StgSharp/Entities/IEntity.cs index 82ce18c1..06a34e0e 100644 --- a/源代码/.Net/StgSharp/Entities/IEntity.cs +++ b/源代码/.Net/StgSharp/Entities/IEntity.cs @@ -8,7 +8,7 @@ namespace StgSharp.Entities { public interface IEntity { - public IGeometry CollisionShape { get; set; } + public Geometry CollisionShape { get; set; } public Sensor CollisionSensor { get; set; } diff --git a/源代码/.Net/StgSharp/Geometries/Geometry.cs b/源代码/.Net/StgSharp/Geometries/Geometry.cs index b462439c..4bbf951f 100644 --- a/源代码/.Net/StgSharp/Geometries/Geometry.cs +++ b/源代码/.Net/StgSharp/Geometries/Geometry.cs @@ -1,10 +1,11 @@ -using System; +using StgSharp.Logic; +using System; using System.Collections.Generic; using System.Text; namespace StgSharp.Geometries { - public interface IGeometry + public class Geometry:INode { diff --git a/源代码/.Net/StgSharp/Geometries/Line.cs b/源代码/.Net/StgSharp/Geometries/Line.cs index 1a69573c..3b33e8ee 100644 --- a/源代码/.Net/StgSharp/Geometries/Line.cs +++ b/源代码/.Net/StgSharp/Geometries/Line.cs @@ -1,10 +1,11 @@ -using System; +using StgSharp.Logic; +using System; using System.Collections.Generic; using System.Text; namespace StgSharp.Geometries { - internal class Line:IGeometry + public class Line:Geometry,INode { diff --git a/源代码/.Net/StgSharp/Geometries/point.cs b/源代码/.Net/StgSharp/Geometries/point.cs index d051f05a..b039c43d 100644 --- a/源代码/.Net/StgSharp/Geometries/point.cs +++ b/源代码/.Net/StgSharp/Geometries/point.cs @@ -1,16 +1,19 @@ using GLFWDotNet; using StgSharp.Control; +using StgSharp.Logic; using System; using System.Collections.Generic; +using System.Drawing; using System.Text; namespace StgSharp.Geometries { - public class Point + public class Point: INode { - public float x; - public float y; + + internal float x; + internal float y; public float X { @@ -19,8 +22,18 @@ namespace StgSharp.Geometries return getXHandler(TimeLine.tickCounter); } } + public float Y + { + get + { + return getYHandler(TimeLine.tickCounter); + } + } public GetLocationHandler getXHandler; public GetLocationHandler getYHandler; + + + } } diff --git a/源代码/.Net/StgSharp/Logic/INode.cs b/源代码/.Net/StgSharp/Logic/INode.cs new file mode 100644 index 00000000..fa562f65 --- /dev/null +++ b/源代码/.Net/StgSharp/Logic/INode.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Logic +{ + public interface INode + { + + } +} diff --git a/源代码/.Net/StgSharp/Logic/LinkedList.cs b/源代码/.Net/StgSharp/Logic/LinkedList.cs index 667478e4..0005980e 100644 --- a/源代码/.Net/StgSharp/Logic/LinkedList.cs +++ b/源代码/.Net/StgSharp/Logic/LinkedList.cs @@ -4,7 +4,57 @@ using System.Text; namespace StgSharp.Logic { - public class LinkedList where T: + public class LinkedList where T: INode { + private LinkedListNode _head; + private LinkedListNode _tail; + + private LinkedListNode _cache; + + public T Head + { + get { return _head._this; } + set { _head = new LinkedListNode(value); } + } + + public T Tail + { + get { return _tail._this; } + set { _tail = new LinkedListNode(value); } + } + + + public void Add(T t) + { + if (_head != default(LinkedListNode)) + { + Head = t; + } + else + { + _cache = new LinkedListNode(t); + _tail._next = _cache; + _cache._previous = _tail; + _tail = _cache; + } + } + + public void RemoveTail() + { + if (_tail==default(LinkedListNode)) + { + + } + else + { + _cache = _tail; + _tail = _cache._previous; + _cache._previous = default(LinkedListNode); + } + } + + + + } } diff --git a/源代码/.Net/StgSharp/Logic/LinkedListNode.cs b/源代码/.Net/StgSharp/Logic/LinkedListNode.cs new file mode 100644 index 00000000..5a0aaa58 --- /dev/null +++ b/源代码/.Net/StgSharp/Logic/LinkedListNode.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Logic +{ + internal class LinkedListNode where T : INode + { + internal readonly T _this; + internal LinkedListNode _previous; + internal LinkedListNode _next; + + public virtual LinkedListNode Previous + { + get { return _previous; } + set { _previous = value; } + } + + public LinkedListNode Next + { + get { return _next; } + set { _next = value; } + } + + public LinkedListNode(T t) + { + _this = t; + } + } +} diff --git a/源代码/.Net/StgSharp/Logic/LinkedObject.cs b/源代码/.Net/StgSharp/Logic/LinkedObject.cs deleted file mode 100644 index 4a38d175..00000000 --- a/源代码/.Net/StgSharp/Logic/LinkedObject.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Logic -{ - public class LinkedObject - { - internal LinkedObject _previous; - internal LinkedObject _next; - - public LinkedObject Previous - { - get { return _previous; } - set { _previous = value; } - } - - public LinkedObject Next - { - get { return _next; } - set { _next = value; } - } - - - } -} diff --git a/源代码/.Net/StgSharp/Logic/Pool.cs b/源代码/.Net/StgSharp/Logic/Pool.cs index ac94bcc3..92b64db3 100644 --- a/源代码/.Net/StgSharp/Logic/Pool.cs +++ b/源代码/.Net/StgSharp/Logic/Pool.cs @@ -1,4 +1,6 @@ -using System; +using StgSharp.Geometries; +using StgSharp.Logic; +using System; using System.Collections.Generic; using System.Text; @@ -6,6 +8,14 @@ namespace StgSharp.Logic { public class Pool { + public LinkedList pointContainer; + public LinkedList geometryContainer; + + public Line leftBoader; + public Line rightBoader; + public Line topBoader; + public Line bottomBoader; + } } diff --git a/源代码/.Net/StgSharpDebug/Program.cs b/源代码/.Net/StgSharpDebug/Program.cs index 76c727ed..49acdbd4 100644 --- a/源代码/.Net/StgSharpDebug/Program.cs +++ b/源代码/.Net/StgSharpDebug/Program.cs @@ -1,10 +1,12 @@ using StgSharp; using StgSharp.Logic; +using System; internal class Program { private static void Main(string[] args) { Console.WriteLine("Hello, World!"); + } } \ No newline at end of file