diff --git a/图像/伟大弹幕巡礼计划图标.psd b/图像/伟大弹幕巡礼计划图标.psd new file mode 100644 index 00000000..cc09fab3 Binary files /dev/null and b/图像/伟大弹幕巡礼计划图标.psd differ diff --git a/图像/图标/伟大弹幕巡礼计划图标.png b/图像/图标/伟大弹幕巡礼计划图标.png new file mode 100644 index 00000000..7a2de852 Binary files /dev/null and b/图像/图标/伟大弹幕巡礼计划图标.png differ diff --git a/源代码/.vs/ProjectEvaluation/stgsharp.metadata.v5.1 b/源代码/.vs/ProjectEvaluation/stgsharp.metadata.v5.1 index 34048148..bf3f06aa 100644 Binary files a/源代码/.vs/ProjectEvaluation/stgsharp.metadata.v5.1 and b/源代码/.vs/ProjectEvaluation/stgsharp.metadata.v5.1 differ diff --git a/源代码/.vs/ProjectEvaluation/stgsharp.projects.v5.1 b/源代码/.vs/ProjectEvaluation/stgsharp.projects.v5.1 index e0ade049..c7929afc 100644 Binary files a/源代码/.vs/ProjectEvaluation/stgsharp.projects.v5.1 and b/源代码/.vs/ProjectEvaluation/stgsharp.projects.v5.1 differ diff --git a/源代码/.vs/StgSharp/DesignTimeBuild/.dtbcache.v2 b/源代码/.vs/StgSharp/DesignTimeBuild/.dtbcache.v2 index 33ee5de0..13f49fc7 100644 Binary files a/源代码/.vs/StgSharp/DesignTimeBuild/.dtbcache.v2 and b/源代码/.vs/StgSharp/DesignTimeBuild/.dtbcache.v2 differ diff --git a/源代码/.vs/StgSharp/FileContentIndex/48fa335b-668e-4f7e-85c9-ba0e354a9670.vsidx b/源代码/.vs/StgSharp/FileContentIndex/2944e050-b995-4f69-8ff6-aca3e30245b2.vsidx similarity index 80% rename from 源代码/.vs/StgSharp/FileContentIndex/48fa335b-668e-4f7e-85c9-ba0e354a9670.vsidx rename to 源代码/.vs/StgSharp/FileContentIndex/2944e050-b995-4f69-8ff6-aca3e30245b2.vsidx index 1fe961e1..6c6a862c 100644 Binary files a/源代码/.vs/StgSharp/FileContentIndex/48fa335b-668e-4f7e-85c9-ba0e354a9670.vsidx and b/源代码/.vs/StgSharp/FileContentIndex/2944e050-b995-4f69-8ff6-aca3e30245b2.vsidx differ diff --git a/源代码/.vs/StgSharp/FileContentIndex/3593c772-d2ff-41d5-8b8e-74e283a935c3.vsidx b/源代码/.vs/StgSharp/FileContentIndex/3593c772-d2ff-41d5-8b8e-74e283a935c3.vsidx deleted file mode 100644 index c0e6d023..00000000 Binary files a/源代码/.vs/StgSharp/FileContentIndex/3593c772-d2ff-41d5-8b8e-74e283a935c3.vsidx and /dev/null differ diff --git a/源代码/.vs/StgSharp/FileContentIndex/449e0a74-9cc6-4b0e-af4a-8f8e0c78f372.vsidx b/源代码/.vs/StgSharp/FileContentIndex/449e0a74-9cc6-4b0e-af4a-8f8e0c78f372.vsidx deleted file mode 100644 index 057d48e6..00000000 Binary files a/源代码/.vs/StgSharp/FileContentIndex/449e0a74-9cc6-4b0e-af4a-8f8e0c78f372.vsidx and /dev/null differ diff --git a/源代码/.vs/StgSharp/FileContentIndex/6f8d376b-8455-46c8-8044-9887da19112b.vsidx b/源代码/.vs/StgSharp/FileContentIndex/6f8d376b-8455-46c8-8044-9887da19112b.vsidx new file mode 100644 index 00000000..8ec6cd03 Binary files /dev/null and b/源代码/.vs/StgSharp/FileContentIndex/6f8d376b-8455-46c8-8044-9887da19112b.vsidx differ diff --git a/源代码/.vs/StgSharp/FileContentIndex/6468942d-1b13-4146-b6e9-9b3f1d5f4286.vsidx b/源代码/.vs/StgSharp/FileContentIndex/f5d54604-7701-4bca-840a-5a69199b1b48.vsidx similarity index 86% rename from 源代码/.vs/StgSharp/FileContentIndex/6468942d-1b13-4146-b6e9-9b3f1d5f4286.vsidx rename to 源代码/.vs/StgSharp/FileContentIndex/f5d54604-7701-4bca-840a-5a69199b1b48.vsidx index 23b80211..290d54c8 100644 Binary files a/源代码/.vs/StgSharp/FileContentIndex/6468942d-1b13-4146-b6e9-9b3f1d5f4286.vsidx and b/源代码/.vs/StgSharp/FileContentIndex/f5d54604-7701-4bca-840a-5a69199b1b48.vsidx differ diff --git a/源代码/.vs/StgSharp/FileContentIndex/fcdc95f2-45f9-4b11-9bc8-1cc8909df4be.vsidx b/源代码/.vs/StgSharp/FileContentIndex/fcdc95f2-45f9-4b11-9bc8-1cc8909df4be.vsidx new file mode 100644 index 00000000..fb7eb060 Binary files /dev/null and b/源代码/.vs/StgSharp/FileContentIndex/fcdc95f2-45f9-4b11-9bc8-1cc8909df4be.vsidx differ diff --git a/源代码/.vs/StgSharp/v17/.futdcache.v2 b/源代码/.vs/StgSharp/v17/.futdcache.v2 index 2a0bdc94..4db0da8a 100644 Binary files a/源代码/.vs/StgSharp/v17/.futdcache.v2 and b/源代码/.vs/StgSharp/v17/.futdcache.v2 differ diff --git a/源代码/.vs/StgSharp/v17/.suo b/源代码/.vs/StgSharp/v17/.suo index d9c932a1..30802d03 100644 Binary files a/源代码/.vs/StgSharp/v17/.suo and b/源代码/.vs/StgSharp/v17/.suo differ diff --git a/源代码/StgSharp/Control/Add.cs b/源代码/StgSharp/Control/Add.cs index fdffd938..045339d3 100644 --- a/源代码/StgSharp/Control/Add.cs +++ b/源代码/StgSharp/Control/Add.cs @@ -1,4 +1,5 @@ using GLFWDotNet; +using StgSharp.Geometries; using System; using System.Collections.Generic; using System.Text; @@ -7,6 +8,9 @@ namespace StgSharp.Control { public static class Add { + public static void GeometryCombination(IGeometryCombination geometry) + { + } } } diff --git a/源代码/StgSharp/Control/BlockOperation.cs b/源代码/StgSharp/Control/BlockOperation.cs new file mode 100644 index 00000000..4f789d75 --- /dev/null +++ b/源代码/StgSharp/Control/BlockOperation.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Control +{ + public abstract class BlockOperation : INode + { + + private ContainerNode _id; + + + ContainerNode INode.ID => _id; + + void INode.setID(ContainerNode id) + { + if (_id == default) + { + _id = id; + } + else + { + throw new InvalidOperationException("Cannot set ID twice!"); + } + } + + + public abstract void OnUpdating(); + + } +} diff --git a/源代码/StgSharp/Control/TimeLine.cs b/源代码/StgSharp/Control/TimeLine.cs index d8f37cff..e6bf0d1b 100644 --- a/源代码/StgSharp/Control/TimeLine.cs +++ b/源代码/StgSharp/Control/TimeLine.cs @@ -1,4 +1,5 @@ -using System; +using StgSharp.Entities; +using System; using System.Collections.Generic; using System.Text; @@ -6,11 +7,28 @@ namespace StgSharp.Control { public static class TimeLine { - public static Pool _cache; - + internal static Pool _currentPool; + public static LinkedList allPool; public static Counter tickCounter = new Counter(0,1,1); + internal static BlockOperation currentOperation; + private static bool isPaused; + internal static void OnRender() + { + tickCounter.QuickAdd(); + foreach (Pool p in allPool) + { + _currentPool = p; + if (!isPaused) + { + currentOperation.OnUpdating(); + } + foreach (EntityPartical b in _currentPool._bulletContainer) + { + } + } + } } } diff --git a/源代码/StgSharp/Entities/Entity.cs b/源代码/StgSharp/Entities/Entity.cs index 8da84b51..046af1a4 100644 --- a/源代码/StgSharp/Entities/Entity.cs +++ b/源代码/StgSharp/Entities/Entity.cs @@ -59,11 +59,11 @@ namespace StgSharp _pos = p; } - void INode.setID(ContainerNode id) + void INode.setID(ContainerNode id) { if (id == null) { - _id = id as ContainerNode; + _id = id; } else { diff --git a/源代码/StgSharp/Entities/Launcher.cs b/源代码/StgSharp/Entities/Launcher.cs index 9d175378..e390d766 100644 --- a/源代码/StgSharp/Entities/Launcher.cs +++ b/源代码/StgSharp/Entities/Launcher.cs @@ -35,7 +35,7 @@ namespace StgSharp get { return _id; } } - void INode>.setID(ContainerNode id) + void INode>.setID(ContainerNode> id) { if (_id == default(ContainerNode>)) { @@ -43,7 +43,7 @@ namespace StgSharp } else { - _id = id as ContainerNode>; + _id = id; } } } diff --git a/源代码/StgSharp/Geometries/IGeometry.cs b/源代码/StgSharp/Geometries/IGeometry.cs index 53ae0bf5..07388cdb 100644 --- a/源代码/StgSharp/Geometries/IGeometry.cs +++ b/源代码/StgSharp/Geometries/IGeometry.cs @@ -27,7 +27,7 @@ namespace StgSharp ContainerNode INode.ID => _id; - void INode.setID(ContainerNode id) + void INode.setID(ContainerNode id) { if (_id != default) { @@ -35,7 +35,7 @@ namespace StgSharp } else { - _id = id as ContainerNode; + _id = id; } } diff --git a/源代码/StgSharp/Geometries/IGeometryCombination.cs b/源代码/StgSharp/Geometries/IGeometryCombination.cs new file mode 100644 index 00000000..61885d1e --- /dev/null +++ b/源代码/StgSharp/Geometries/IGeometryCombination.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Geometries +{ + public abstract class IGeometryCombination:LinkedList + { + + } +} diff --git a/源代码/StgSharp/Geometries/Point.cs b/源代码/StgSharp/Geometries/Point.cs index 21cd5443..e9f4662d 100644 --- a/源代码/StgSharp/Geometries/Point.cs +++ b/源代码/StgSharp/Geometries/Point.cs @@ -34,11 +34,11 @@ namespace StgSharp get { return this._position.Y; } } - void INode.setID(ContainerNode id) + void INode.setID(ContainerNode id) { if (id == null) { - _id = id as ContainerNode; + _id = id; } else { diff --git a/源代码/StgSharp/Geometries/Rectangle.cs b/源代码/StgSharp/Geometries/Rectangle.cs index 5f6522ce..1dea72e6 100644 --- a/源代码/StgSharp/Geometries/Rectangle.cs +++ b/源代码/StgSharp/Geometries/Rectangle.cs @@ -11,58 +11,58 @@ namespace StgSharp.Geometries internal Point _center; internal Point _centerToCorner1; internal Point _centerToCorner2; - internal GetLocationHandler _centerMov; - internal GetLocationHandler _CTC1Handler; - internal GetLocationHandler _CTC2Handler; + internal RenderMode _renderMode; - Point IGeometry.BasePoint - { - get { return _basePoint; } - } - Point IGeometry.RefPoint - { - get { return _center; } - } + public override sealed Point BasePoint => _basePoint; + public override sealed Point RefPoint=>_center; - Point IGeometry.RefVec01 - { - get { return _centerToCorner1; } - } + public override sealed Point RefVec01 => _centerToCorner1; - Point IGeometry.RefVec02 - { - get { return _centerToCorner2; } - } + public override sealed Point RefVec02 => _centerToCorner2; + public override RenderMode renderMode => _renderMode; - void IGeometry.OnRender() + internal override sealed void OnRender(uint tick) { - this._CTC2Handler.Invoke(_centerToCorner2._position, Control.TimeLine.tickCounter); } - float IGeometry.SetArrayX() + public override sealed float SetArrayX() { throw new NotImplementedException(); } - float IGeometry.SetArrayY() + public override sealed float SetArrayY() { throw new NotImplementedException(); } - void INode.setID(ContainerNode id) + internal override void CalcVec01(uint tick) { - if (_id != default(ContainerNode)) - { - throw new ArgumentException(); - } - else - { - _id = id as ContainerNode; - } - + _center._position = _basePoint._position + MovCenter(tick); } + + internal override void CalcVec02(vec2d vec, uint tick) + { + _centerToCorner1._position = vec + UpdateCTC1(tick); + } + + internal override void CalcVec03(vec2d vec, uint tick) + { + _centerToCorner2._position = vec + UpdateCTC2(tick); + if (_centerToCorner1._position.GetLength() + == _centerToCorner2._position.GetLength()) + { + throw new ArgumentException("Cannot form a triangle, " + + "two crossing lines are not equal!"); + } + } + + public virtual vec2d MovCenter(uint tick)=>default(vec2d); + + public virtual vec2d UpdateCTC1(uint tick) => default(vec2d); + + public virtual vec2d UpdateCTC2(uint tick) => default(vec2d); } } diff --git a/源代码/StgSharp/Geometries/Triangle.cs b/源代码/StgSharp/Geometries/Triangle.cs index 72dcfd8e..c1f49e1d 100644 --- a/源代码/StgSharp/Geometries/Triangle.cs +++ b/源代码/StgSharp/Geometries/Triangle.cs @@ -2,80 +2,74 @@ using StgSharp.Math; using System; using System.Collections.Generic; +using System.Runtime.CompilerServices; using System.Text; namespace StgSharp { public class Triangle :IGeometry { - internal ContainerNode _id; internal Point _basePoint; - internal Point _refPoint; + internal Point _beginPoint; internal Point _line1; internal Point _line2; + internal RenderMode _renderMode; - internal GetLocationHandler _refMovHandler; - internal GetLocationHandler _line01MovHandler; - internal GetLocationHandler _line02MovHandler; + public override sealed Point BasePoint => _basePoint; - Point IGeometry.BasePoint + public override sealed Point RefPoint=>_beginPoint; + + public override sealed Point RefVec01 => _line1; + + public override sealed Point RefVec02 => _line2; + + public override RenderMode renderMode => _renderMode; + + internal override void CalcVec01(uint tick) { - get { return _basePoint; } + _beginPoint._position = _basePoint._position+ MovBegin(tick); } - Point IGeometry.RefPoint + internal override void CalcVec02(vec2d vec, uint tick) { - get { return _refPoint; } + _line1._position = vec + CalcSide1(tick); } - Point IGeometry.RefVec01 + internal override void CalcVec03(vec2d vec, uint tick) { - get { return _refPoint; } + _line2._position = vec + CalcSide2(tick); } - Point IGeometry.RefVec02 + public virtual vec2d MovBegin(uint tick) => default(vec2d); + + public virtual vec2d CalcSide1(uint tick)=> default(vec2d); + + public virtual vec2d CalcSide2(uint tick) => default(vec2d); + + internal override sealed void OnRender(uint tick) { - get { return _line1; } + CalcVec01(tick); + switch (_renderMode) + { + case RenderMode.BasePoint: + CalcVec02(BasePoint._position,tick); + CalcVec03(BasePoint._position,tick); + break; + case RenderMode.RefPoint: + CalcVec02(_beginPoint._position,tick); + CalcVec03(_beginPoint._position,tick); + break; + default: + break; + } } - GetLocationHandler IGeometry.Vec01Expression - { - get { return _refMovHandler; } - } - - GetLocationHandler IGeometry.Vec02Expression - { - get { return _line01MovHandler; } - } - - GetLocationHandler IGeometry.Vec03Expression - { - get { return _line02MovHandler; } - } - - ContainerNode INode.ID - { - get { return _id; } - } - - - - void IGeometry.OnRender() + public override float SetArrayX() { throw new NotImplementedException(); } - float IGeometry.SetArrayX() - { - throw new NotImplementedException(); - } - - float IGeometry.SetArrayY() - { - throw new NotImplementedException(); - } - - void INode.setID(ContainerNode id) + public override float SetArrayY() { throw new NotImplementedException(); } diff --git a/源代码/StgSharp/Logic/ContainerNode.cs b/源代码/StgSharp/Logic/ContainerNode.cs index 927fa25f..72f15795 100644 --- a/源代码/StgSharp/Logic/ContainerNode.cs +++ b/源代码/StgSharp/Logic/ContainerNode.cs @@ -9,7 +9,7 @@ namespace StgSharp { internal ContainerNode ID { get; } - internal void setID(ContainerNode id) where T : INode; + internal void setID(ContainerNode id); } @@ -23,7 +23,7 @@ namespace StgSharp public ContainerNode(T t) { _value = t; - t.setID(this); + t.setID(this); } public virtual ContainerNode Previous diff --git a/源代码/StgSharp/Logic/LinkedList.cs b/源代码/StgSharp/Logic/LinkedList.cs index 4df718f9..c5362580 100644 --- a/源代码/StgSharp/Logic/LinkedList.cs +++ b/源代码/StgSharp/Logic/LinkedList.cs @@ -6,12 +6,12 @@ using System.Text; namespace StgSharp { - public class LinkedList:IEnumerable where T: INode + public class LinkedList:IEnumerable,INode> where T: INode { internal readonly ContainerNode _heading; internal ContainerNode _first; internal ContainerNode _tail; - + private ContainerNode> _id; private ContainerNode _cache; public LinkedList() @@ -35,6 +35,7 @@ namespace StgSharp set { _tail = new ContainerNode(value); } } + ContainerNode> INode>.ID => _id; public void Add(T t) { @@ -69,5 +70,17 @@ namespace StgSharp { return new LinkedListEnumrator(this); } + + void INode>.setID(ContainerNode> id) + { + if (_id == null) + { + throw new ArgumentException("Cannot set ID twice"); + } + else + { + _id = id; + } + } } } diff --git a/源代码/StgSharp/Logic/Pool.cs b/源代码/StgSharp/Logic/Pool.cs index b8e5224a..fc6e72cc 100644 --- a/源代码/StgSharp/Logic/Pool.cs +++ b/源代码/StgSharp/Logic/Pool.cs @@ -1,4 +1,5 @@ -using StgSharp; +using Steamworks; +using StgSharp; using StgSharp.Entities; using System; using System.Collections.Generic; @@ -7,25 +8,31 @@ using System.Text; namespace StgSharp { - public class Pool + public class Pool:INode { - public LinkedList pointContainer; - public LinkedList geometryContainer; - public LinkedList _bulletContainer; - public LinkedList _awardContainer; - public LinkedList _enemyContainer; + internal LinkedList pointContainer; + internal LinkedList geometryContainer; + internal LinkedList _bulletContainer; + internal LinkedList _awardContainer; + internal LinkedList _enemyContainer; - public Line leftBoader; - public Line rightBoader; - public Line topBoader; - public Line bottomBoader; + internal Line leftBoader; + internal Line rightBoader; + internal Line topBoader; + internal Line bottomBoader; internal Sensor Sensor; + private ContainerNode _id; + + + public Pool() { } + ContainerNode INode.ID => _id; + public void OnRender() { foreach (Enemy e in _enemyContainer) @@ -34,6 +41,17 @@ namespace StgSharp } } + void INode.setID(ContainerNode id) + { + if (_id == default) + { + _id = id; + } + else + { + throw new ArgumentException("Cannot set ID twicee!"); + } + } } } diff --git a/源代码/StgSharp/bin/Debug/netstandard2.1/StgSharp.dll b/源代码/StgSharp/bin/Debug/netstandard2.1/StgSharp.dll index 8b68e8dd..6ff28eac 100644 Binary files a/源代码/StgSharp/bin/Debug/netstandard2.1/StgSharp.dll and b/源代码/StgSharp/bin/Debug/netstandard2.1/StgSharp.dll differ diff --git a/源代码/StgSharp/bin/Debug/netstandard2.1/StgSharp.pdb b/源代码/StgSharp/bin/Debug/netstandard2.1/StgSharp.pdb index 01fc3a66..ae412ec4 100644 Binary files a/源代码/StgSharp/bin/Debug/netstandard2.1/StgSharp.pdb and b/源代码/StgSharp/bin/Debug/netstandard2.1/StgSharp.pdb differ diff --git a/源代码/StgSharp/obj/Debug/netstandard2.1/StgSharp.dll b/源代码/StgSharp/obj/Debug/netstandard2.1/StgSharp.dll index 8b68e8dd..6ff28eac 100644 Binary files a/源代码/StgSharp/obj/Debug/netstandard2.1/StgSharp.dll and b/源代码/StgSharp/obj/Debug/netstandard2.1/StgSharp.dll differ diff --git a/源代码/StgSharp/obj/Debug/netstandard2.1/StgSharp.pdb b/源代码/StgSharp/obj/Debug/netstandard2.1/StgSharp.pdb index 01fc3a66..ae412ec4 100644 Binary files a/源代码/StgSharp/obj/Debug/netstandard2.1/StgSharp.pdb and b/源代码/StgSharp/obj/Debug/netstandard2.1/StgSharp.pdb differ diff --git a/源代码/StgSharp/obj/Debug/netstandard2.1/ref/StgSharp.dll b/源代码/StgSharp/obj/Debug/netstandard2.1/ref/StgSharp.dll index 97caa4ec..e945e8d1 100644 Binary files a/源代码/StgSharp/obj/Debug/netstandard2.1/ref/StgSharp.dll and b/源代码/StgSharp/obj/Debug/netstandard2.1/ref/StgSharp.dll differ diff --git a/源代码/StgSharp/obj/Debug/netstandard2.1/refint/StgSharp.dll b/源代码/StgSharp/obj/Debug/netstandard2.1/refint/StgSharp.dll index 97caa4ec..e945e8d1 100644 Binary files a/源代码/StgSharp/obj/Debug/netstandard2.1/refint/StgSharp.dll and b/源代码/StgSharp/obj/Debug/netstandard2.1/refint/StgSharp.dll differ diff --git a/源代码/StgSharpDebug/obj/Debug/net6.0/StgSharpDebug.csproj.AssemblyReference.cache b/源代码/StgSharpDebug/obj/Debug/net6.0/StgSharpDebug.csproj.AssemblyReference.cache index 6d5b4f36..814fd8bb 100644 Binary files a/源代码/StgSharpDebug/obj/Debug/net6.0/StgSharpDebug.csproj.AssemblyReference.cache and b/源代码/StgSharpDebug/obj/Debug/net6.0/StgSharpDebug.csproj.AssemblyReference.cache differ