daily update on 20230301 by nitload youmu, file struct cahnged and more vec func added

This commit is contained in:
Nitload
2023-03-02 01:30:46 +08:00
parent d09105c9c1
commit bb71567e51
594 changed files with 368 additions and 2601 deletions
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{71FFD00B-B2B1-4D23-B80F-1FEDA55D3E7F}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Debug</RootNamespace>
<AssemblyName>Debug</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=3.3.3.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.3.3.3\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="OpenTK.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Stg_Sharp\StgSharp.csproj">
<Project>{09e14fbb-ef63-496e-bfb2-2a47c1ee4111}</Project>
<Name>StgSharp</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,25 @@
<configuration>
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
<!-- XQuartz compatibility (X11 on Mac) -->
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>
@@ -0,0 +1,33 @@
using OpenTK;
using StgSharp;
using StgSharp.Geometries;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Debug
{
internal class Program
{
public static void Main()
{
OperationHandler operationHandler = new OperationHandler(cw);
for (int i = 0; i < 10; i++)
{
operationHandler.Invoke(i);
}
}
public static void cw(int x)
{
Console.WriteLine(x);
}
public delegate void OperationHandler(int x);
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Debug")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Debug")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("71ffd00b-b2b1-4d23-b80f-1feda55d3e7f")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
@@ -0,0 +1 @@
51fe2eeb4772cba64a34f22d94343e2e81185c5d
@@ -0,0 +1,14 @@
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\bin\Debug\Debug.exe.config
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\bin\Debug\Debug.exe
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\bin\Debug\Debug.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\bin\Debug\StgSharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\bin\Debug\OpenTK.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\bin\Debug\StgSharp.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\bin\Debug\OpenTK.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\bin\Debug\OpenTK.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\obj\Debug\Debug.csproj.AssemblyReference.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\obj\Debug\Debug.csproj.SuggestedBindingRedirects.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\obj\Debug\Debug.csproj.CoreCompileInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\obj\Debug\Debug.csproj.CopyComplete
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\obj\Debug\Debug.exe
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Debug\obj\Debug\Debug.pdb
@@ -0,0 +1 @@
obj\Debug\\_IsIncrementalBuild
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenTK" version="3.3.3" targetFramework="net472" />
</packages>
@@ -0,0 +1,31 @@
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}") = "StgSharp", "Stg_Sharp\StgSharp.csproj", "{09E14FBB-EF63-496E-BFB2-2A47C1EE4111}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debug", "Debug\Debug.csproj", "{71FFD00B-B2B1-4D23-B80F-1FEDA55D3E7F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{09E14FBB-EF63-496E-BFB2-2A47C1EE4111}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09E14FBB-EF63-496E-BFB2-2A47C1EE4111}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09E14FBB-EF63-496E-BFB2-2A47C1EE4111}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09E14FBB-EF63-496E-BFB2-2A47C1EE4111}.Release|Any CPU.Build.0 = Release|Any CPU
{71FFD00B-B2B1-4D23-B80F-1FEDA55D3E7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71FFD00B-B2B1-4D23-B80F-1FEDA55D3E7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71FFD00B-B2B1-4D23-B80F-1FEDA55D3E7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{71FFD00B-B2B1-4D23-B80F-1FEDA55D3E7F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D9288FB8-3C06-4172-A2B4-11D58F0792F5}
EndGlobalSection
EndGlobal
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram />
@@ -0,0 +1,247 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="StgSharp.Control.Bind" Collapsed="true">
<Position X="23.25" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Control\Bind.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Control.Create" Collapsed="true">
<Position X="23.25" Y="1.5" Width="1.5" />
<TypeIdentifier>
<HashCode>ACAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAQgAA=</HashCode>
<FileName>Control\Create.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Control.Pool" Collapsed="true">
<Position X="25" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAIgAAACAAAAAAAAgCAAAAAAAAAAAUAAgAAAAAAAAAA=</HashCode>
<FileName>Control\Pool.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Geometry.Circle" Collapsed="true">
<Position X="10" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>CApIgCACAAAQAACAAEQAAACAAAAAAAAAAEBAIAEIAAE=</HashCode>
<FileName>Geometry\Circle.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="StgSharp.Geometry.FreeCurve" Collapsed="true">
<Position X="14.5" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAgAgBAAAAAgAAAAAAAAAAAAAAAAAABACAAAIAEIAAA=</HashCode>
<FileName>Geometry\FreeCurve.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="StgSharp.Geometry.a" Collapsed="true">
<Position X="21.5" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Geometry\IPoint.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Geometry.Line" Collapsed="true">
<Position X="7.75" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAgAgAAAACAQAAAAAAQAAABACAAAABAABAAAIAABAAA=</HashCode>
<FileName>Geometry\Line.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="StgSharp.Geometry.PointCommon" Collapsed="true">
<Position X="12.25" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>ABIAACAIAAQAAAAgAAAAIAAAAIBhAAIABEAAIABAYAE=</HashCode>
<FileName>Geometry\PointCommon.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="StgSharp.Geometry.PointOnCircle" Collapsed="true">
<Position X="16.75" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAACAIAARAAAAAAAAAAAAAIAAAAQAAAEAAIAAAYAA=</HashCode>
<FileName>Geometry\PointOnCircle.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="StgSharp.Geometry.PointOnLine" Collapsed="true">
<Position X="1" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAACAIAAQAQAAAAAAAAAAAAAAAIBAAAEAAIQABYAA=</HashCode>
<FileName>Geometry\PointOnLine.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="StgSharp.Entity.Bullet" Collapsed="true">
<Position X="3.25" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>CAAIAAAIAAQAAAAAAAIAIAAAAAAAAAIAACAAIAAAYAA=</HashCode>
<FileName>Entity\Bullet.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Entity.Enemy" Collapsed="true">
<Position X="5.5" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAIAAQAAAAAAAIAIAAAAAAAAAIAACAAIAAAYAA=</HashCode>
<FileName>Entity\Enemy.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Entity.Launcher" Collapsed="true">
<Position X="25" Y="1.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAIUAQAAAAAIAIAAAAAAAAAAAAAACAAAAAAYAA=</HashCode>
<FileName>Entity\Launcher.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Entity.Player" Collapsed="true">
<Position X="21.5" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAIABQCABAgABAAFQAAQQAIKAAAEAAEIAAAYAE=</HashCode>
<FileName>Entity\Player.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Entity.Reward" Collapsed="true">
<Position X="19" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>EAAAAgAIAAQAAAAAAAAECAAAIEAAAAAAgAAAIQAAYAA=</HashCode>
<FileName>Entity\Reward.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Game.CoreInfo" Collapsed="true">
<Position X="26.75" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAEgAAAAAAAAAAAAAAAAEAAAAAAAAIIAAAAAAAAAAA=</HashCode>
<FileName>Game\CoreInfo.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Logic.Counter&lt;T&gt;" Collapsed="true">
<Position X="21.5" Y="1.5" Width="1.5" />
<TypeIdentifier>
<HashCode>ABAAEAAAAAABAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAA=</HashCode>
<FileName>Logic\Counter.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Logic.LinkedList" Collapsed="true">
<Position X="3.75" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAIAAAAgAIAAAAAAAAAABAACAAgAAAAABAAAhCEAAAA=</HashCode>
<FileName>Logic\LinkedList.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Logic.LinkedObject" Collapsed="true">
<Position X="10" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>BgAAAAAAAAAAAgAAAAAAIAAAAAAAAAIgAAAAAAAAAAA=</HashCode>
<FileName>Logic\LinkedObject.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="StgSharp.Logic.EntityContainer" Collapsed="true">
<Position X="7.25" Y="4.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAIAAAAAjEgAAEAAQIQAACAAMAQgACACAIAAAAAA=</HashCode>
<FileName>Pool\EntityContainer.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="StgSharp.Logic.GeometryContainer" Collapsed="true">
<Position X="0.5" Y="4.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAIAAAAAjEgAAEAAQIQAACAAMAQgACACAIAAAAAA=</HashCode>
<FileName>Pool\GeometryContainer.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="StgSharp.Logic.PointContainer" Collapsed="true">
<Position X="2.75" Y="4.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAIAAAAAjEgAAEAAQIQAACAAMAQgACACAAAAAAAA=</HashCode>
<FileName>Pool\PointContainer.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="StgSharp.Pool.BulletPool" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="25" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>ACAAEAAAAAAAIAAEAAAAAAABAAAAAiAAAAQEIIAAAAM=</HashCode>
<FileName>Pool\BulletPool.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="StgSharp.Pool.Collector" Collapsed="true">
<Position X="5" Y="4.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAIAAAAAjEgAAEAAQIQAACQAMAQgACACAAAAAEAA=</HashCode>
<FileName>Pool\Collector.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="StgSharp.Pool.PointPool" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="23.25" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAgAAAIBAAAAIAAAAAAAAAABAACAACAAAAAAAYAAAAA=</HashCode>
<FileName>Pool\PointPool.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="StgSharp.UI.Option" Collapsed="true">
<Position X="26.75" Y="1.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAACCAAAAAAQAAAAAEAAA=</HashCode>
<FileName>UI\Option.cs</FileName>
</TypeIdentifier>
</Class>
<Interface Name="StgSharp.Geometry.IGeometry" Collapsed="true">
<Position X="23.25" Y="3.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAgAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAA=</HashCode>
<FileName>Geometry\IGeometry.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="StgSharp.Geometry.IPoint" Collapsed="true">
<Position X="25" Y="3.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAIAAAYAA=</HashCode>
<FileName>Geometry\IPoint.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="StgSharp.Logic.IContainer" Collapsed="true">
<Position X="21.5" Y="3.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAIAAAAAAAAhAgAAAAAQAQAACAAIAAAACACAAAAAAAA=</HashCode>
<FileName>Logic\IContainer.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="StgSharp.Pool.IPool" Collapsed="true">
<Position X="26.75" Y="3.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAIAAAAAAAAAABAAAAACAAAAAAAIAAAAA=</HashCode>
<FileName>Logic\IPool.cs</FileName>
</TypeIdentifier>
</Interface>
<Enum Name="StgSharp.Pool.side" Collapsed="true">
<Position X="21.5" Y="4.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAABAAAAAAAAgAAAAIAAAAAAAAAAAAgAA=</HashCode>
<FileName>Pool\Collector.cs</FileName>
</TypeIdentifier>
</Enum>
<Delegate Name="StgSharp.Geometry.ComplexOperationHandler" Collapsed="true">
<Position X="21.5" Y="5.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Control\ComplexOperationHandler.cs</FileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="StgSharp.UI.SelectEventHandler" Collapsed="true">
<Position X="23.25" Y="5.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>UI\Option.cs</FileName>
</TypeIdentifier>
</Delegate>
<Font Name="Microsoft YaHei UI" Size="9.16" />
</ClassDiagram>
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp
{
public delegate void ComplexOperationHandler();
}
@@ -0,0 +1,27 @@
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
{
/// <summary>
/// 将对战区在指定时间内变化至指定大小和位置
/// </summary>
/// <param name="size">对战区的长宽</param>
/// <param name="center">对战区矩形中心的位置</param>
/// <param name="count ">完成变化需要的时间</param>
public static void BattleField(float[] size, float[] center, uint count )
{
}
}
}
@@ -0,0 +1,156 @@
using StgSharp.Entities;
using StgSharp.Geometries;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Headers;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Control
{
static public partial class Create
{
/// <summary>
/// 创建一个子弹并将其绑定在一个指定的点上
/// </summary>
/// <param name="point">表示子弹坐标的点</param>
public static void Bullet(Point point)
{
TimeLine.pool.bulletContainer.Add(new Bullet(point));
}
/// <summary>
/// 创建一组子弹,并将其绑定在点池的一组点上
/// 顺序是从最后创建的点向前计数
/// </summary>
/// <param name="begin">起始序号</param>
/// <param name="end">终点序号</param>
public static void Bullet(int begin, int end)
{
LinkedObject cache = TimeLine.pool.pointContainer.Ending;
for (int i = 1; i < begin; i++)
{
cache--;
}
for (int i = begin; i < end; i++)
{
cache--;
TimeLine.pool.bulletContainer.Add(new Bullet(cache as Point));
}
}
/// <summary>
/// 在新创建的一个或一组圆的其中一个上创建一组子弹
/// </summary>
/// <param name="order"></param>
/// <param name="count"></param>
/// <param name="angle"></param>
public static void Bullet(int order,uint count,float angle)
{
LinkedObject cache=TimeLine.pool.pointContainer.Ending;
for (int i = 1; i < count; i++)
{
cache--;
}
for (uint i = 0; i < count; i++)
{
PointOnCircle p = new PointOnCircle(cache as Circle, angle, i);
TimeLine.pool.pointContainer.Add(p);
TimeLine.pool.bulletContainer.Add(new Bullet(p));
}
}
/// <summary>
/// 创建一个简单点,并设置其速度和初始角度
/// </summary>
/// <param name="beginX"></param>
/// <param name="beginY"></param>
/// <param name="angle"></param>
/// <param name="x"></param>
/// <param name="y"></param>
public static void Point(float beginX,float beginY,float angle,float[] x, float[] y)
{
PointCommon p = new PointCommon(beginX, beginY, angle,TimeLine.tickCounter);
p.XVelocity = x;
p.YVelocity = y;
TimeLine.pool.pointContainer.Add(p);
}
/// <summary>
/// 快速创建一个不需要移动的点
/// </summary>
/// <param name="beginX">横坐标</param>
/// <param name="beginY">纵坐标</param>
public static void Point(float beginX, float beginY)
{
Point point = new Point();
point.X = beginX;
point.Y = beginY;
TimeLine.pool.pointContainer.Add(point);
}
/// <summary>
/// 通过圆心与半径定义一个圆
/// </summary>
/// <param name="c"></param>
/// <param name="r"></param>
public static void Circle(Point c, float r)
{
Circle o = new Circle(c,r,TimeLine.tickCounter);
TimeLine.pool.geometryContainer.Add(o);
}
/// <summary>
/// 通过圆心和圆上一点定义一个圆
/// </summary>
/// <param name="c"></param>
/// <param name="s"></param>
public static void Circle(Point c, Point s)
{
Circle o = new Circle(c, s,TimeLine.tickCounter);
TimeLine.pool.geometryContainer.Add(o);
}
/// <summary>
/// 通过起点和终点定义一条直线
/// </summary>
/// <param name="b"></param>
/// <param name="e"></param>
public static void Line(Point b, Point e)
{
Line l = new Line(b,e);
TimeLine.pool.geometryContainer.Add(l);
}
/// <summary>
/// 创建一组傅里叶展开式定义的圆阵列
/// </summary>
/// <param name="c"></param>
/// <param name="radiuses"></param>
/// <param name="angles"></param>
/// <param name="rv"></param>
public static void Fourier(Point c, float[] radiuses, float[] angles, float[] rotateFunc)
{
Point o;
Circle circle;
int length = radiuses.Length;
for (int i = 0; i<length; i++)
{
circle = new Circle(c,radiuses[i],TimeLine.tickCounter);
float[] f = new float[10];
f[10]=rotateFunc[i];
circle.RadiusFunc = f;
o = new PointOnCircle(circle, angles[i],1);
TimeLine.pool.geometryContainer.Add(circle);
TimeLine.pool.pointContainer.Add(o);
}
}
}
}
@@ -0,0 +1,97 @@
using StgSharp.Entities;
using StgSharp.Geometries;
using StgSharp.Logic;
using StgSharp.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Control
{
internal static class Get
{
public static Point Point(this Pool pool,SelectOperation<Point> operation )
{
Point pointCache = pool.pointContainer.Heading;
for (; pointCache!= null; )
{
if (operation.Invoke(pointCache))
{
break;
}
pointCache++;
}
return null;
}
public static void Point()
{
}
public static Bullet Bullet(this Pool pool, SelectOperation<Bullet> operation)
{
Bullet bulletCache ;
bulletCache = pool.bulletContainer.Heading;
for (; bulletCache != null; )
{
if (operation.Invoke(bulletCache))
{
break;
}
bulletCache++;
}
return bulletCache;
}
public static Circle Circle( this Pool pool, SelectOperation<Circle> operation)
{
Geometry geomCache;
geomCache = pool.geometryContainer.Heading;
for (; geomCache != null ; )
{
if (geomCache is Circle && operation.Invoke(geomCache as Circle))
{
break;
}
geomCache++;
}
return geomCache as Circle;
}
public static Line Line(this Pool pool, SelectOperation<Line> operation)
{
Geometry geomCache;
geomCache= pool.geometryContainer.Heading;
for (; geomCache != null ; )
{
if (geomCache is Line && operation.Invoke(geomCache as Line))
{
break;
}
geomCache++;
}
return geomCache as Line;
}
public static Enemy Enemy(this Pool pool, SelectOperation<LinkedObject> operation)
{
Entity enemyCache;
enemyCache= pool.entityContainer.Heading ;
for (; enemyCache != null ; )
{
if (enemyCache is Enemy && operation.Invoke(enemyCache as Enemy ))
{
break;
}
enemyCache++;
}
return enemyCache as Enemy;
}
}
}
@@ -0,0 +1,12 @@
using StgSharp.Geometries;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Control
{
public delegate bool SelectOperation<T>(T p)where T : LinkedObject ;
}
@@ -0,0 +1,15 @@
using StgSharp.Geometries;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Control
{
public class Set
{
}
}
@@ -0,0 +1,33 @@
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Control
{
public static class TimeLine
{
public static Pool pool;
public static List<Pool> poolList;
public static ComplexOperationHandler complexOperationHandler;
public static Counter<uint> tickCounter;
public static void OnRender()
{
foreach (Pool pool in poolList)
{
TimeLine.pool = pool;
complexOperationHandler.Invoke();
}
}
}
}
@@ -0,0 +1,63 @@
using StgSharp.Geometries;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Entities
{
public class Bullet : LinkedObject
{
internal Point _location;
public Point Location
{
get { return _location; }
set { _location = value; }
}
internal float _x;
internal float _y;
public float X
{
get { return _x; }
set { _x = value; }
}
public float Y
{
get { return _y; }
set { _y = value; }
}
private float _radius;
public float Radius
{
get { return _radius; }
set { _radius = value; }
}
public Bullet(Point p)
{
_location = p;
}
public void OnRender()
{
}
public static Bullet operator ++(Bullet a)
{
return a._next as Bullet;
}
public static Bullet operator --(Bullet a)
{
return a._previous as Bullet;
}
}
}
@@ -0,0 +1,58 @@
using StgSharp.Geometries;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Entities
{
internal class Enemy:Entity
{
private float _x;
public float X
{
get { return _x; }
set { _x = value; }
}
private int _y;
public int Y
{
get { return _y; }
set { _y = value; }
}
private Point _location;
public Point Location
{
get { return _location; }
set { _location = value; }
}
public Enemy()
{
}
public void OnRender()
{
}
public static Enemy operator ++(Enemy a)
{
return a._next as Enemy;
}
public static Enemy operator --(Enemy a)
{
return a._next as Enemy;
}
}
}
@@ -0,0 +1,22 @@
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
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;
}
}
}
@@ -0,0 +1,57 @@
using StgSharp.Geometries;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Entities
{
public unsafe class Launcher
{
private Point _location;
public Point Location
{
get { return _location; }
set { _location = value; }
}
protected float _x;
public float X
{
get { return _location.X; }
}
private float _y;
public float Y
{
get { return _y; }
set { _y = value; }
}
private Bullet _launchType;
public Bullet LaunchType
{
get { return _launchType; }
set { _launchType = value; }
}
public Launcher(Bullet launchType, Point loc)
{
_launchType = launchType;
_location = loc;
}
public void Launch()
{
}
}
}
@@ -0,0 +1,217 @@
using OpenTK.Input;
using StgSharp.Control;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Entities
{
public class Player
{
private uint gameTick;
private uint beginTick;
private readonly float _velocityHigh;
private readonly float _vHighCorner;
private float topBoarder;
private float bottomBoarder;
private float leftBoarder;
private float rightBoarder;
public float VelocityHigh
{
get { return _velocityHigh; }
}
private readonly float _velocityLow;
private readonly float _vLowCorner;
public float VelocityLow
{
get { return _velocityLow; }
}
private float _x;
public float X
{
get { return _x; }
set { _x = value; }
}
public float _y;
public float Y
{
get { return _y; }
set { _y = value; }
}
private KeyboardState _keyboardState;
public KeyboardState KeyboardState
{
get { return _keyboardState; }
set { _keyboardState = value; }
}
public Player(float velocityHigh, float velocityLow, KeyboardState keyboardState)
{
this._velocityHigh = velocityHigh;
this._vHighCorner = velocityHigh / 1.4142136f;
this._velocityLow = velocityLow;
this._vLowCorner = velocityLow / 1.4142136f;
this._keyboardState = keyboardState;
}
private Launcher _launcherAtHigh;
public Launcher LauncherAtHigh
{
get { return LauncherAtHigh; }
set { LauncherAtHigh = value; }
}
private Launcher _launcherAtLow;
public void OnRender()
{
//进行各种碰撞判定
//先进行中弹判定
//进行移动和射击
if (_keyboardState.IsKeyDown(Key.ShiftLeft)||
_keyboardState.IsKeyDown(Key.ShiftRight))
{
FastShoot();
FastMove();
}
else
{
SlowMove();
SlowSoot();
}
}
/// <summary>
/// 自机高速移动的简单方法
/// </summary>
public void SlowMove()
{
if (_keyboardState.IsKeyDown(Key.Up))
{
if (_keyboardState.IsKeyDown(Key.Left))
{
this._y += _vLowCorner;
this._x -= _vLowCorner;
}
else if (_keyboardState.IsKeyDown(Key.Right))
{
this._y += _vLowCorner;
this._x += _vLowCorner;
}
else
{
this._y += _velocityLow;
}
}
else if (_keyboardState.IsKeyDown(Key.Down))
{
if (_keyboardState.IsKeyDown(Key.Left))
{
this._y -= _vLowCorner;
this._x -= _vLowCorner;
}
else if (_keyboardState.IsKeyDown(Key.Right))
{
this._y -= _vLowCorner;
this._x += _vLowCorner;
}
else
{
this._y -= _velocityLow;
}
}
}
/// <summary>
/// 自机低速移动的简单方法
/// </summary>
public void FastMove()
{
if (_keyboardState.IsKeyDown(Key.Up))
{
if (_keyboardState.IsKeyDown(Key.Left))
{
this._y += _vHighCorner;
this._x -= _vHighCorner;
}
else if (_keyboardState.IsKeyDown(Key.Right))
{
this._y += _vHighCorner;
this._x += _vHighCorner;
}
else
{
this._y += _velocityHigh;
}
}
else if (_keyboardState.IsKeyDown(Key.Down))
{
if (_keyboardState.IsKeyDown(Key.Left))
{
this._y -= _vHighCorner;
this._x -= _vHighCorner;
}
else if (_keyboardState.IsKeyDown(Key.Right))
{
this._y -= _vHighCorner;
this._x += _vHighCorner;
}
else
{
this._y -= _velocityHigh;
}
}
}
public void UseSkill()
{
if (_keyboardState.IsKeyDown(Key.X))
{
//new event added to use spell
}
}
public void FastShoot()
{
if (_keyboardState.IsKeyDown(Key.Z))
{
}
}
public void SlowSoot()
{
if (_keyboardState.IsKeyDown(Key.Z))
{
_launcherAtLow.Launch();
}
}
public void Die()
{
}
}
}
@@ -0,0 +1,47 @@
using StgSharp.Geometries;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Entities
{
public class RenderedGeometry
{
internal Geometry route;
public Geometry Route
{
get { return route; }
set { route = value; }
}
internal float _rangeBegin;
internal float _rangeEnd;
public float Range
{
get { return _rangeBegin; }
set { _rangeBegin = value; }
}
public float RangeEnd
{
get { return _rangeEnd; }
set { _rangeEnd = value; }
}
public float[][] GetVertexArray()
{
int length = (int)(_rangeEnd - _rangeBegin);
float[][] result = new float[length][];
for (int i = 0; i < length; i++)
{
}
//计算点
return result;
}
}
}
@@ -0,0 +1,87 @@
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Entities
{
internal class Reward:LinkedObject
{
private float _x;
private float _y;
private float _v;
private bool _isBeingCollected;
private Player _player;
public float X
{
get { return _x; }
set { _x = value; }
}
public float Y
{
get { return _y; }
set { _y = value; }
}
public float Velo
{
get { return _v; }
set { _v = value; }
}
public bool IsBeingCollected
{
get { return _isBeingCollected; }
set { _isBeingCollected = value; }
}
public Player Player
{
get { return _player; }
set { _player = value; }
}
public Reward(float x,float y,float v)
{
_x = x;
_y = y;
_v = v;
this._isBeingCollected=false;
}
private float distance;
public void OnRender()
{
if (_isBeingCollected)
{
distance = (float)Math.Sqrt
((_x-_player.X)* (_x - _player.X)
+(_y-_player.Y)* (_y - _player.Y));
_x += (_player.X-_x)*_v/distance;
_y += (_player.Y-_y) * _v / distance;
}
else
{
_y -= _v;
}
}
public void Collet(Player player)
{
_player = player;
_v *= 2.0f;
//后期改为由行为包控制
}
}
}
@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Game
{
public class CoreInfo
{
public static readonly string _coreSignature;
public static readonly string _coreName;
public static readonly uint _pointLimit = 2048 ;
public static readonly uint _geometryLimit = 512 ;
internal string CoreEdition
{
get { return _coreName; }
}
internal string CoreSignature
{
get { return _coreSignature; }
}
public void ShowVersion()
{
Console.WriteLine($"StgSharp core: {_coreName}");
Console.WriteLine($"StgSharp core signature: {_coreSignature}");
}
}
}
@@ -0,0 +1,225 @@
using StgSharp.Entities;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Geometries
{
public unsafe class Circle :Geometry
{
private Point _center;
public Point Center
{
get { return _center; }
set { _center = value; }
}
internal Point _bindPoint;
private float _radius;
public float Radius
{
get { return _radius; }
set { _radius = value; }
}
private float[] _radiusFunc = new float[10];
public float[] RadiusFunc
{
get { return _radiusFunc; }
set
{
if (value.Length == 10)
{
_radiusFunc = value;
}
else
{
throw new Exception("Parameters are too many or too few!");
}
}
}
private float _angle;
public float Angle
{
get { return _angle; }
set { _angle = value; }
}
public new float[] XExpression
{
get
{
//计算圆的参数方程的泰勒展开式
return _xExpression;
}
}
public new float[] YExpression
{
get
{
//计算圆的参数方程的泰勒展开式
return _yExpression;
}
}
private float[] _rotateFunc = new float[10];
private float[] RotateFunc
{
get { return _rotateFunc; }
set
{
if (value.Length == 10)
{
_rotateFunc = value;
}
else
{
throw new Exception("Parameters are too many or too few!");
}
}
}
readonly private Counter<uint> tickCounter;
readonly private uint beginTick;
public ComplexOperationHandler complexOperationHandler;
public event ComplexOperationHandler ComplexOperation
{
add { complexOperationHandler += value; }
remove { complexOperationHandler -= value; }
}
/// <summary>
/// 创建一个圆的快速方法
/// </summary>
/// <param name="center">圆心</param>
/// <param name="radius">半径</param>
/// <param name="counter">游戏刻计数器</param>
public Circle(Point center, float radius,Counter<uint> counter)
{
this._center = center;
this._radius = radius;
this.tickCounter = counter;
this.beginTick = counter.Value;
this._angle = 0;
}
/// <summary>
/// 在创建实例时设定圆的变化方式
/// </summary>
/// <param name="center">圆心</param>
/// <param name="radius">半径初始值</param>
/// <param name="counter">游戏刻计数器</param>
/// <param name="rFunc">半径的时间函数</param>
/// <param name="roFunc">角速度时间函数</param>
public Circle(Point center, float radius, Counter<uint> counter, float[] rFunc, float[] roFunc)
{
this._center = center;
this._radius = radius;
this.tickCounter = counter;
this.beginTick = counter.Value;
this._angle = 0;
this.RadiusFunc = rFunc;
this.RotateFunc = roFunc;
}
/// <summary>
/// 通过两个点创建一个完全定义的圆实例
/// </summary>
/// <param name="c">作为圆心的点</param>
/// <param name="b">在圆周上的点</param>
public Circle(Point c,Point b,Counter<uint> tickCounter)
{
this._center = c;
this. _bindPoint = b;
this.tickCounter = tickCounter;
this.beginTick = tickCounter.Value;
}
public void SetMotion(float[] rFunc, float[] roFunc)
{
if (rFunc!=null)
{
this.RadiusFunc = rFunc;
}
if (roFunc!=null)
{
this.RotateFunc = roFunc;
}
}
/// <summary>
/// 将圆心绑定到一个新的点上;
/// </summary>
/// <param name="p">想要绑定的圆心</param>
public void Bind(Point p)
{
_center = p;
}
//需要一个将点绑定在圆周上
public void OnRender()
{
float a = 0;
float tick = tickCounter.Value - beginTick;
if (_rotateFunc!=null)
{
for (int i = 0; i < 9; i++)
{
a += _rotateFunc[i];
a *= tick;
}
_angle = a + _rotateFunc[9];
}
if (_bindPoint!=null)
{
float r = (float)
Math.Sqrt((_bindPoint.X - _center.X) * (_bindPoint.X - _center.X)
+ (_bindPoint.Y - _center.Y) * (_bindPoint.Y - _center.Y));
_radius= r;
}
else if (_radiusFunc!=null)
{
float b = 0;
for (int i = 0; i < 9; i++)
{
b += _radiusFunc[i];
b *= tick;
}
_radius=b+ _radiusFunc[9];
}
}
}
}
@@ -0,0 +1,58 @@
using StgSharp.Entities;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Geometries
{
internal class FreeCurve : Geometry
{
private Point _center;
public Point Center
{
get { return _center; }
set { _center = value; }
}
public FreeCurve(Point c, float[] x, float[] y)
{
if (x.Length==10)
{
_xExpression = x;
}
else
{
throw new Exception("Parameters are too many or too few!");
}
if (y.Length==10)
{
_yExpression = y;
}
else
{
throw new Exception("Parameters are too many or too few!");
}
}
public void Bind(Point p)
{
_center = p;
}
public void OnRender()
{
}
}
}
@@ -0,0 +1,38 @@
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Geometries
{
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;
}
internal float[] _xExpression;
internal float[] _yExpression;
public float[] XExpression
{
get { return _xExpression; }
set { _xExpression = value; }
}
public float[] YExpression
{
get { return _yExpression; }
set { _yExpression = value; }
}
}
}
@@ -0,0 +1,71 @@
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Geometries
{
public class Line:Geometry
{
private Point _beginPoint;
public Point BeginPoint
{
get { return _beginPoint; }
set { _beginPoint = value; }
}
private Point _endingPoint;
public Point EndingPoint
{
get { return _endingPoint; }
set { _endingPoint = value; }
}
private float _length;
public float Length
{
get { return _length; }
set { _length = value; }
}
public ComplexOperationHandler complexOperationHandler;
public event ComplexOperationHandler ComplexOperation
{
add { complexOperationHandler += value; }
remove { complexOperationHandler -= value; }
}
public Line()
{
}
/// <summary>
/// 线段的构造器,应当传入线段的起点和终点
/// </summary>
/// <param name="begin"></param>
/// <param name="end"></param>
public Line(Point begin, Point end)
{
_beginPoint = begin;
_endingPoint = end;
}
public void OnRender()
{
_length = (float)
Math.Sqrt((_endingPoint.X - _beginPoint.X) * (_endingPoint.X - _beginPoint.X)
+ (_endingPoint.Y - _beginPoint.Y) * (_endingPoint.Y - _beginPoint.Y));
}
}
}
@@ -0,0 +1,55 @@
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Geometries
{
public class Point:LinkedObject
{
internal float _x;
internal float _y;
internal float _angle;
internal float vX;
internal float vY;
public float X
{
get { return _x; }
set{ _x = value; }
}
public float Y
{
get { return _y; }
set { _y = value; }
}
float Angle
{
get { return _angle; }
set { _angle = value; }
}
public virtual void OnRender()
{
}
public static Point operator ++(Point a)
{
return a._next as Point;
}
public static Point operator --(Point a)
{
return a._previous as Point;
}
}
}
@@ -0,0 +1,104 @@
using StgSharp.Entities;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Geometries
{
internal class PointCommon : Point
{
private readonly float x0;
private readonly float y0;
private float angle0;
private float[] _xVelocity = new float[10];
public float[] XVelocity
{
get { return _xVelocity; }
set
{
if (value.Length == 10)
{
_xVelocity = value;
}
else
{
throw new Exception("Parameters are too many or too few!");
}
}
}
private float[] _yVelocity = new float[10] ;
public float[] YVelocity
{
get { return _yVelocity; }
set
{
if (value.Length == 10)
{
_yVelocity = value;
}
else
{
throw new Exception("Parameters are too many or too few!");
}
}
}
private uint beginTick;
private static Counter<uint> _tickCounter;
public static Counter<uint> TickCounter
{
get { return _tickCounter; }
}
public PointCommon(float x,float y,float angle,Counter<uint> tickCounter)
{
_x = x;
x0 = x;
_y = y;
y0 = y;
angle0 = angle;
_tickCounter = tickCounter;
beginTick = _tickCounter.Value;
}
public override void OnRender()
{
uint tick=_tickCounter.Value-beginTick;
float d = 0;
for (int i = 0; i < 9; i++)
{
d += _xVelocity[i];
d *= tick;
}
_x += (d += _xVelocity[9]);
d = 0;
for (int i = 0; i < 9; i++)
{
d += _yVelocity[i];
d += tick;
}
_y += (d += _yVelocity[9]);
}
}
}
@@ -0,0 +1,50 @@
using StgSharp.Entities;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Geometries
{
public class PointOnCircle :Point
{
private Circle _bindedItem;
public Circle geometryItem
{
get { return _bindedItem; }
set { _bindedItem = value; }
}
private float _angle0;
/// <summary>
///
/// </summary>
/// <param name="c">点所在的圆</param>
/// <param name="angle">点的初项</param>
/// <param name="counts">阵列次数</param>
/// <param name="gameTick">游戏刻计数器</param>
public PointOnCircle(Circle c, float angle, uint counts)
{
_bindedItem = c;
_angle0 = (angle + counts * (360.0f / counts)) * (float)(2 * Math.PI / 360);
}
public override void OnRender()
{
_angle = _angle0 + _bindedItem.Angle;
this._x = (float)(_bindedItem.Center.X + _bindedItem.Radius * Math.Cos(_angle));
this._y = (float)(_bindedItem.Center.X + _bindedItem.Radius * Math.Sin(_angle));
}
}
}
@@ -0,0 +1,56 @@
using StgSharp.Entities;
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Geometries
{
public class PointOnLine : Point
{
private Point _beginPoint;
public Point BeginPoint
{
get { return _beginPoint; }
set { _beginPoint = value; }
}
private Point _endPoint;
public Point EndPoint
{
get { return _endPoint; }
set { _endPoint = value; }
}
private float _rate;
public PointOnLine(Point beginPoint, Point endPoint, float rate, int number)
{
_beginPoint = beginPoint;
_endPoint = endPoint;
_angle = (float)(Math.Atan2(endPoint.Y - beginPoint.Y, endPoint.X - beginPoint.Y));
_rate = rate * number;
this._y = beginPoint.Y + rate * (endPoint.Y - beginPoint.Y);
this._x = beginPoint.X + rate * (endPoint.X - beginPoint.X);
}
public override void OnRender()
{
_angle = (float)(Math.Atan2(_endPoint.Y - _beginPoint.Y, _endPoint.X - _beginPoint.Y));
this._y = _beginPoint.Y + _rate * (_endPoint.Y - _beginPoint.Y);
this._x = _beginPoint.X + _rate * (_endPoint.X - _beginPoint.X);
}
}
}
@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Logic
{
public unsafe class Counter<T> where T : struct
{
private T _value;
public T Value
{
get { return _value; }
set { _value = value; }
}
private T _max;
public T Max
{
get { return _max; }
set { _max = value; }
}
public Counter()
{
}
public void Increase(T deltaValue)
{
//_value += deltaValue;
}
public void Decrease(T deltaValue)
{
//_value -= deltaValue;
}
}
}
@@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Logic
{
public class LinkedList<T> where T : LinkedObject
{
protected T _heading = null;
protected T _ending;
protected T _cache;
protected Counter<uint> _amountCounter;
public virtual T Heading
{
get { return _heading; }
set { _heading = value; }
}
public virtual T Ending
{
get { return _ending; }
set { _ending = value; }
}
public T Cache
{
get { return _cache; }
set { _cache = value; }
}
public Counter<uint> AmountCounter
{
get { return _amountCounter; }
set { _amountCounter = value; }
}
/// <summary>
/// 构造一个专用链表,并将计数器传入
/// </summary>
/// <param name="counter"></param>
public LinkedList(Counter<uint> counter)
{
_amountCounter = counter;
_amountCounter.Value = 0;
_heading = null;
}
public void Add(T target)
{
if (_ending != null)
{
_ending.Next = target;
target.Previous = _ending;
_ending = target;
_amountCounter.Value++;
}
else
{
_heading = target;
_heading.Previous = null;
_ending = target;
_ending.Next = null;
}
}
/// <summary>
/// 根据序号删除一个链表成员。
/// </summary>
/// <param name="id"></param>
public void Remove(int id)
{
_cache = null;
for (int i = 1; i < id; i++)
{
_cache = _cache.Next as T;
}
_cache.Previous = _cache.Next;
_cache.Next = _cache.Previous;
_cache.Next = null;
_cache.Previous = null;
_cache = null;
_amountCounter.Value--;
}
/// <summary>
/// 快速删除链表中已知名称的一个实例。由于不能判别实例是否存在于链表中故安全性较低。在对安全性有要求的情况下应当使用Remove_s方法。
/// </summary>
/// <param name="target"></param>
public void Remove(T target)
{
target.Previous = target.Next;
target.Next = target.Previous;
target.Previous = null;
target.Next = null;
_amountCounter.Value--;
}
/// <summary>
/// 该方法用于防止传入不属于该链表的实例。
/// </summary>
/// <param name="target"></param>
/// <exception cref="Exception"></exception>
public void Remove_s(T target)
{
bool a = true;
_cache = _heading;
for (int i = 0; _cache.Next != null; i++)
{
if (_cache == target)
{
Remove(target);
a = false;
_amountCounter.Value--;
}
}
if (a)
{
throw new Exception("Target can not be found in this List!");
}
}
}
}
@@ -0,0 +1,44 @@
using OpenTK.Graphics.ES20;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Logic
{
public class LinkedObject
{
protected LinkedObject _previous;
public LinkedObject Previous
{
get { return _previous; }
set
{
_previous = value;
}
}
protected LinkedObject _next;
public LinkedObject Next
{
get { return _next; }
set
{
_next = value;
}
}
public static LinkedObject operator ++(LinkedObject a)
{
return a._next;
}
public static LinkedObject operator --(LinkedObject a)
{
return a._previous;
}
}
}
@@ -0,0 +1,68 @@
using StgSharp.Entities;
using StgSharp.Geometries;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Logic
{
public class Pool
{
public Player player;
internal static Counter<uint> collectCounter
=new Counter<uint>();
internal Logic.LinkedList<LinkedObject> topCollector
=new Logic.LinkedList<LinkedObject>(collectCounter);
internal Logic.LinkedList<LinkedObject> bottomCollector
=new Logic.LinkedList<LinkedObject>(collectCounter);
internal Logic.LinkedList<LinkedObject> leftCollector
=new Logic.LinkedList<LinkedObject>(collectCounter);
internal Logic.LinkedList<LinkedObject> rightCollector
=new Logic.LinkedList<LinkedObject>(collectCounter);
public Reflector leftBoarder;
public Reflector rightBoarder;
public Reflector topBoarder;
public Reflector bottomBoarder;
internal Bullet bulletCache;
internal static Counter<uint> bulletCounter
=new Counter<uint>();
internal Logic.LinkedList<Bullet> bulletContainer
= new Logic.LinkedList<Bullet>(bulletCounter);
internal Entity entityCache;
internal static Counter<uint> entityCounter
=new Counter<uint>();
internal Logic.LinkedList<Entity> entityContainer
=new Logic.LinkedList<Entity>(entityCounter);
internal Geometries.Geometry geometryCache;
internal static Counter<uint> gemoetryCounter
=new Counter<uint>();
internal Logic.LinkedList<Geometries.Geometry> geometryContainer
=new Logic.LinkedList<Geometries.Geometry>(gemoetryCounter);
internal Point pointCache;
internal static Counter<uint> pointCounter
=new Counter<uint>();
internal Logic.LinkedList<Point> pointContainer
=new Logic.LinkedList<Point>(pointCounter);
public Pool()
{
}
}
}
@@ -0,0 +1,70 @@
using StgSharp.Control;
using StgSharp.Entities;
using StgSharp.Geometries;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Logic
{
public class Reflector
{
internal Point _begin;
public Point Begin
{
get { return _begin; }
}
internal float vecX;
internal float vecY;
/// <summary>
/// 反射器是一个直线形无纹理实体,
/// 与反射器发生碰撞的实体将被执行对应的操作。
/// 反射器可以通过起点坐标和方向矢量定义。
/// </summary>
/// <param name="beginX">起点横坐标</param>
/// <param name="beginY">起点纵坐标</param>
/// <param name="vecX">方向矢量X分量</param>
/// <param name="vecY">方向矢量Y分量</param>
public Reflector(float beginX, float beginY,float vecX,float vecY)
{
Control.Create.Point(beginX,beginY);
this._begin = TimeLine.pool.pointContainer.Ending;
this.vecX = vecX;
this.vecY = vecY;
}
public Reflector(Point begin, Point end)
{
_begin = begin;
vecX = end.X;
vecY = end.Y;
}
/// <summary>
/// 检查某个点穿过反射器的方向,
/// 以反射器正方向向上时定义
/// </summary>
/// <param name="point">被检查的点</param>
/// <returns></returns>
public bool IsPointLeft(Point point)
{
return
vecX * point.vY+vecY*point.vX>0;
}
/// <summary>
/// 检测
/// </summary>
/// <param name="bullet"></param>
/// <returns></returns>
public bool? IsBulletLeft(Bullet bullet)
{
}
}
}
@@ -0,0 +1,25 @@
<configuration>
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
<!-- XQuartz compatibility (X11 on Mac) -->
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Stg_Sharp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Nitload_Space")]
[assembly: AssemblyProduct("Stg_Sharp")]
[assembly: AssemblyCopyright("Copyright © Nitload_Space 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("09e14fbb-ef63-496e-bfb2-2a47c1ee4111")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{09E14FBB-EF63-496E-BFB2-2A47C1EE4111}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>StgSharp</RootNamespace>
<AssemblyName>StgSharp</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=3.3.3.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.3.3.3\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Control\Change.cs" />
<Compile Include="Control\TimeLine.cs" />
<Compile Include="Control\SelectOperation.cs" />
<Compile Include="Control\Get.cs" />
<Compile Include="Control\Set.cs" />
<Compile Include="Logic\Reflector.cs" />
<Compile Include="Logic\Pool.cs" />
<Compile Include="Control\Create.cs" />
<Compile Include="Entities\RenderedGeometry.cs" />
<Compile Include="Entities\Entity.cs" />
<Compile Include="Entities\Reward.cs" />
<Compile Include="Entities\Enemy.cs" />
<Compile Include="Game\CoreInfo.cs" />
<Compile Include="ComplexOperationHandler.cs" />
<Compile Include="Geometries\Geometry.cs" />
<Compile Include="Geometries\FreeCurve.cs" />
<Compile Include="Geometries\Point.cs" />
<Compile Include="Geometries\PointCommon.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Entities\Bullet.cs" />
<Compile Include="Entities\Player.cs" />
<Compile Include="Entities\Launcher.cs" />
<Compile Include="Geometries\Circle.cs" />
<Compile Include="Geometries\PointOnLine.cs" />
<Compile Include="Geometries\PointOnCircle.cs" />
<Compile Include="Geometries\Line.cs" />
<Compile Include="Logic\Counter.cs" />
<Compile Include="Logic\LinkedList.cs" />
<Compile Include="Logic\LinkedObject.cs" />
<Compile Include="UI\BattleField.cs" />
<Compile Include="UI\Background.cs" />
<Compile Include="UI\SelectEventHandler.cs" />
<Compile Include="UI\Option.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="TextFile1.txt" />
</ItemGroup>
<ItemGroup>
<None Include="ClassDiagram2.cd" />
<None Include="OpenTK.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
@@ -0,0 +1,10 @@
20221029
重大算法bug,为减少运算量创建的子弹池结构由多个块构成,块边界附近的子弹
不一定会参加碰撞判定运算,使不一定触发player中弹事件
其中一个解决方案是在边界处的子弹将被两个块共享,即同时拥有该子弹的实例成员
此时,限制子弹数量的计数器和实例添加器应当由池管理,而非由链表本身管理。
若如此,子弹池本身应当拥有一个容器存放全部子弹,避免边界处子弹的OnRender方法
被反复触发。
@@ -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.UI
{
public class Background
{
}
}
@@ -0,0 +1,48 @@
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.UI
{
public class BattleField
{
internal Pool pool;
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; }
}
public BattleField()
{
pool = new Pool();
}
}
}
@@ -0,0 +1,55 @@
using StgSharp.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.UI
{
public class Option:LinkedObject
{
public SelectEventHandler selectEventHandler;
public event SelectEventHandler SelectEvent
{
add { this.selectEventHandler += value; }
remove { this.selectEventHandler -= value; }
}
internal float[] textureLocation;
internal float[] highLightlocation = new float[4] ;
public float[] HighLightTextureLocation
{
get { return highLightlocation; }
set
{
if (value.Length == 4)
{
highLightlocation = value;
}
else throw new ArgumentException("Too much or too few data is provided");
}
}
public void HighLight()
{
this.textureLocation = highLightlocation;
}
public void LowLight()
{
}
}
}
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.UI
{
public delegate void SelectEventHandler();
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
@@ -0,0 +1 @@
cae813d95901df120cf6341acd23090873717337
@@ -0,0 +1,10 @@
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\bin\Debug\StgSharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\bin\Debug\StgSharp.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\bin\Debug\OpenTK.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\bin\Debug\OpenTK.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\bin\Debug\OpenTK.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\obj\Debug\StgSharp.csproj.AssemblyReference.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\obj\Debug\StgSharp.csproj.CoreCompileInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\obj\Debug\StgSharp.csproj.CopyComplete
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\obj\Debug\StgSharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\obj\Debug\StgSharp.pdb
@@ -0,0 +1 @@
b4eff8e6d37a34965f1d99fc3819eccdc83dfb8b
@@ -0,0 +1,10 @@
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\bin\Debug\Stg_Sharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\bin\Debug\Stg_Sharp.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\bin\Debug\OpenTK.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\bin\Debug\OpenTK.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\bin\Debug\OpenTK.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\obj\Debug\Stg_Sharp.csproj.AssemblyReference.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\obj\Debug\Stg_Sharp.csproj.CoreCompileInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\obj\Debug\Stg_Sharp.csproj.CopyComplete
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\obj\Debug\Stg_Sharp.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\Stg_Sharp\Stg_Sharp\obj\Debug\Stg_Sharp.pdb
@@ -0,0 +1 @@
obj\Debug\\_IsIncrementalBuild
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenTK" version="3.3.3" targetFramework="net472" />
</packages>
@@ -0,0 +1,25 @@
<configuration>
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
<!-- XQuartz compatibility (X11 on Mac) -->
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>
File diff suppressed because it is too large Load Diff