diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/0b256a33-25ce-4029-b691-d66045bdb68c.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/0b256a33-25ce-4029-b691-d66045bdb68c.vsidx deleted file mode 100644 index 1c380bf6..00000000 Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/0b256a33-25ce-4029-b691-d66045bdb68c.vsidx and /dev/null differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/189d97f5-fce9-47b2-9a01-0cc61090a898.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/189d97f5-fce9-47b2-9a01-0cc61090a898.vsidx new file mode 100644 index 00000000..a1ded9dd Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/189d97f5-fce9-47b2-9a01-0cc61090a898.vsidx differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/3038ddc6-7b2a-40c2-8818-f8dc83f5bdc9.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/3038ddc6-7b2a-40c2-8818-f8dc83f5bdc9.vsidx new file mode 100644 index 00000000..c27a45ed Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/3038ddc6-7b2a-40c2-8818-f8dc83f5bdc9.vsidx differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/4c276a07-0724-4921-b766-7d650bddb03e.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/4c276a07-0724-4921-b766-7d650bddb03e.vsidx deleted file mode 100644 index 3de28ffb..00000000 Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/4c276a07-0724-4921-b766-7d650bddb03e.vsidx and /dev/null differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/73f65834-ae82-43dc-8385-0a65b8f81124.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/73f65834-ae82-43dc-8385-0a65b8f81124.vsidx new file mode 100644 index 00000000..dbc2eab0 Binary files /dev/null and b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/73f65834-ae82-43dc-8385-0a65b8f81124.vsidx differ diff --git a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/af87ee9c-1876-4504-9800-da0923d6094d.vsidx b/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/af87ee9c-1876-4504-9800-da0923d6094d.vsidx deleted file mode 100644 index 0657d2a5..00000000 Binary files a/源代码/.Net Framework/Stg_Sharp/.vs/Stg_Sharp/FileContentIndex/af87ee9c-1876-4504-9800-da0923d6094d.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 6ebf8298..322a121c 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/Change.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Change.cs new file mode 100644 index 00000000..cd1e55cc --- /dev/null +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Change.cs @@ -0,0 +1,24 @@ +using StgSharp; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Control +{ + public static class Change + { + + /// + /// 将对战区在指定时间内变化至指定大小和位置 + /// + /// 对战区的长宽 + /// 对战区矩形中心的位置 + /// 完成变化需要的时间 + public static void BattleField(float[] size, float[] center, uint count ) + { + + } + } +} diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Get.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Get.cs index 30a719c1..0db519dd 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Get.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Get.cs @@ -1,5 +1,6 @@ using StgSharp.Entities; using StgSharp.Geometries; +using StgSharp.Logic; using StgSharp.UI; using System; using System.Collections.Generic; @@ -11,41 +12,82 @@ namespace StgSharp.Control { internal class Get { - static bool isNotSelected; + static Point pointCache; - - static Circle circleCache; + static Bullet bulletCache; + static Geometry geometryCache; + static Entity enemyCache; - public static Point Point(SelectOperation selectPointOperation ) + public static Point Point(SelectOperation operation ) { - isNotSelected = true; pointCache = Pool.pointContainer.Heading; - for (; pointCache.Next != null; ) + for (; pointCache!= null; ) { - if (selectPointOperation.Invoke(pointCache)) + if (operation.Invoke(pointCache)) { - isNotSelected = false; - return pointCache; break; } pointCache++; } - if (isNotSelected) - { - return null; - } + return null; } public static Bullet Bullet(SelectOperation operation) { - + bulletCache = Pool.bulletContainer.Heading; + for (; bulletCache != null; ) + { + if (operation.Invoke(bulletCache)) + { + break; + } + bulletCache++; + } + return bulletCache; } public static Circle Circle(SelectOperation operation) { - circleCache = Pool.geometryContainer.Heading; + geometryCache = Pool.geometryContainer.Heading; + for (; geometryCache != null ; ) + { + if (geometryCache is Circle && operation.Invoke(geometryCache as Circle)) + { + break; + } + geometryCache++; + } + return geometryCache as Circle; + } + + public static Line Line(SelectOperation operation) + { + geometryCache= Pool.geometryContainer.Heading; + for (; geometryCache != null ; ) + { + if (geometryCache is Line && operation.Invoke(geometryCache as Line)) + { + break; + } + geometryCache++; + } + return geometryCache as Line; + } + + public static Enemy Enemy(SelectOperation operation) + { + enemyCache= Pool.entityContainer.Heading ; + for (; enemyCache != null ; ) + { + if (enemyCache is Enemy && operation.Invoke(enemyCache as Enemy )) + { + break; + } + enemyCache++; + } + return enemyCache as Enemy; } diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs index 0f812640..18cac426 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Pool.cs @@ -4,6 +4,7 @@ using StgSharp.Logic; using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Runtime.ExceptionServices; using System.Text; using System.Threading.Tasks; @@ -12,6 +13,7 @@ namespace StgSharp.Control { public static class Pool { + public static Player player; public static Counter tickCounter = new Counter(); @@ -26,6 +28,11 @@ namespace StgSharp.Control internal static Logic.LinkedList rightCollector = new Logic.LinkedList(collectCounter); + public static float leftBoarder; + public static float rightBoarder; + public static float topBoarder; + public static float bottomBoarder; + internal static Bullet bulletCache; internal static Counter bulletCounter =new Counter(); @@ -59,8 +66,18 @@ namespace StgSharp.Control public static void OnRender() { + bulletCache = bulletContainer.Heading; + for (; bulletCache!=null;) + { + if (true) + { + } + } } + + + } diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Set.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Set.cs index 7efac83e..34570b98 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Set.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Control/Set.cs @@ -1,4 +1,4 @@ -using StgSharp.Geometry; +using StgSharp.Geometries; using StgSharp.Logic; using System; using System.Collections.Generic; diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Enemy.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Enemy.cs index 89bfd2e9..618cdc98 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Enemy.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Enemy.cs @@ -1,4 +1,4 @@ -using StgSharp.Geometry; +using StgSharp.Geometries; using StgSharp.Logic; using System; using System.Collections.Generic; @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace StgSharp.Entities { - internal class Enemy:LinkedObject + internal class Enemy:Entity { private float _x; @@ -26,9 +26,9 @@ namespace StgSharp.Entities set { _y = value; } } - private IPoint _location; + private Point _location; - public IPoint Location + public Point Location { get { return _location; } set { _location = value; } diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Entity.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Entity.cs index 677a0741..8f5d056b 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Entity.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Entity.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; @@ -9,6 +10,13 @@ namespace StgSharp.Entities { internal class Entity:LinkedObject { - + public static Entity operator ++(Entity e) + { + return e.Next as Entity; + } + public static Entity operator --(Entity e) + { + return e.Next as Entity; + } } } diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Launcher.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Launcher.cs index 9e66eaf5..209059a0 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Launcher.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Launcher.cs @@ -1,4 +1,4 @@ -using StgSharp.Geometry; +using StgSharp.Geometries; using System; using System.Collections.Generic; using System.Linq; @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace StgSharp.Entities { - internal unsafe class Launcher + public unsafe class Launcher { private Point _location; diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Player.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Player.cs index 1dd75929..98f4af72 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Player.cs +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/Entities/Player.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace StgSharp.Entities { - internal class Player + public class Player { private uint gameTick; private uint beginTick; diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj index c309802b..a1c54f26 100644 --- a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/StgSharp.csproj @@ -45,6 +45,7 @@ + @@ -71,6 +72,7 @@ + diff --git a/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/UI/BattleField.cs b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/UI/BattleField.cs new file mode 100644 index 00000000..d1666949 --- /dev/null +++ b/源代码/.Net Framework/Stg_Sharp/Stg_Sharp/UI/BattleField.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.UI +{ + public class BattleField + { + internal float _leftBoarder; + public float LeftBoarder + { + get { return _leftBoarder; } + set { _leftBoarder = value; } + } + + internal float _rightBoarder; + public float RightBoarder + { + set { _rightBoarder = value; } + get { return _rightBoarder; } + } + + internal float _topBoarder; + public float TopBoarder + { + set { _topBoarder = value; } + get { return _topBoarder; } + } + + internal float _bottomBoarder; + public float BottomBoarder + { + set { _bottomBoarder = value; } + get { return _bottomBoarder; } + } + } +} diff --git a/源代码/.Net Framework/WpfApp1/.vs/ProjectEvaluation/wpfapp1.metadata.v5.1 b/源代码/.Net Framework/WpfApp1/.vs/ProjectEvaluation/wpfapp1.metadata.v5.1 new file mode 100644 index 00000000..20efe967 Binary files /dev/null and b/源代码/.Net Framework/WpfApp1/.vs/ProjectEvaluation/wpfapp1.metadata.v5.1 differ diff --git a/源代码/.Net Framework/WpfApp1/.vs/ProjectEvaluation/wpfapp1.projects.v5.1 b/源代码/.Net Framework/WpfApp1/.vs/ProjectEvaluation/wpfapp1.projects.v5.1 new file mode 100644 index 00000000..22a85669 Binary files /dev/null and b/源代码/.Net Framework/WpfApp1/.vs/ProjectEvaluation/wpfapp1.projects.v5.1 differ diff --git a/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/FileContentIndex/0d66853b-6c58-4409-9d56-c46dc621f24f.vsidx b/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/FileContentIndex/0d66853b-6c58-4409-9d56-c46dc621f24f.vsidx new file mode 100644 index 00000000..b5051e19 Binary files /dev/null and b/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/FileContentIndex/0d66853b-6c58-4409-9d56-c46dc621f24f.vsidx differ diff --git a/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/FileContentIndex/read.lock b/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/FileContentIndex/read.lock new file mode 100644 index 00000000..e69de29b diff --git a/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/v17/.futdcache.v2 b/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/v17/.futdcache.v2 new file mode 100644 index 00000000..682aca33 Binary files /dev/null and b/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/v17/.futdcache.v2 differ diff --git a/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/v17/.suo b/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/v17/.suo new file mode 100644 index 00000000..52a0ba9a Binary files /dev/null and b/源代码/.Net Framework/WpfApp1/.vs/WpfApp1/v17/.suo differ diff --git a/源代码/.Net Framework/WpfApp1/WpfApp1.sln b/源代码/.Net Framework/WpfApp1/WpfApp1.sln new file mode 100644 index 00000000..89d30d3c --- /dev/null +++ b/源代码/.Net Framework/WpfApp1/WpfApp1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32825.248 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApp1", "WpfApp1\WpfApp1.csproj", "{45C21A71-DDDF-4004-8E54-4AD69D3F6C00}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {45C21A71-DDDF-4004-8E54-4AD69D3F6C00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45C21A71-DDDF-4004-8E54-4AD69D3F6C00}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45C21A71-DDDF-4004-8E54-4AD69D3F6C00}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45C21A71-DDDF-4004-8E54-4AD69D3F6C00}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {442581B8-67D2-4F2E-B9F1-5F31DC125E34} + EndGlobalSection +EndGlobal diff --git a/源代码/.Net Framework/WpfApp1/WpfApp1/App.xaml b/源代码/.Net Framework/WpfApp1/WpfApp1/App.xaml new file mode 100644 index 00000000..2e70522d --- /dev/null +++ b/源代码/.Net Framework/WpfApp1/WpfApp1/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/源代码/.Net Framework/WpfApp1/WpfApp1/App.xaml.cs b/源代码/.Net Framework/WpfApp1/WpfApp1/App.xaml.cs new file mode 100644 index 00000000..909eaa54 --- /dev/null +++ b/源代码/.Net Framework/WpfApp1/WpfApp1/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace WpfApp1 +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/源代码/.Net Framework/WpfApp1/WpfApp1/AssemblyInfo.cs b/源代码/.Net Framework/WpfApp1/WpfApp1/AssemblyInfo.cs new file mode 100644 index 00000000..8b5504ec --- /dev/null +++ b/源代码/.Net Framework/WpfApp1/WpfApp1/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/源代码/.Net Framework/WpfApp1/WpfApp1/MainWindow.xaml b/源代码/.Net Framework/WpfApp1/WpfApp1/MainWindow.xaml new file mode 100644 index 00000000..16991ffb --- /dev/null +++ b/源代码/.Net Framework/WpfApp1/WpfApp1/MainWindow.xaml @@ -0,0 +1,13 @@ + + +