Bullet chainlist added

This commit is contained in:
NitloadProgramming
2022-08-23 19:08:00 +08:00
parent a09e955439
commit 0370392873
25 changed files with 250 additions and 3 deletions
Binary file not shown.
@@ -17,11 +17,79 @@ else
BTM.x += BTM.XMotion(Eclipse); BTM.x += BTM.XMotion(Eclipse);
BTM.y += BTM.YMotion(Eclipse); BTM.y += BTM.YMotion(Eclipse);
BTM = BTM.next; BTM = BTM.next;
} }
*/ */
/*
这是一条子弹链类
是一个高度特化的链表
class Curve
{
public Bullet First {get; set;}
public Bullet Last {get; set;}
private Bullet bulletCache;
public int count;
public Curve
{
count = 0;
}
在队列最后添加子弹
public void addBullet(Bullet bullet)
{
this.Last.next = bullet;
bullet.Former = this.Last;
this.Last = bullet;
count++;
}
在指定位置插入子弹
public void insertBullet(Bullet bullet, int order)
{
bulletCache = this.First;
for(int i = 0; i < order; i ++)
{
bulletCache = bulletCache.Next;
}
bullet.Next = bulletCache.Next;
bulletCache.Former = bullet;
bulletCache.Next = bullet;
bullet.Former = buleltCache;
count++;
}
获取指定位置的子弹对象
public void getBullet(int order)
{
bulletCache = this.First;
for(int i = 0; i < order; i ++)
{
bulletCache = bulletCache.Next;
}
return bulletCache;
}
移除指定位置的子弹
public void remove(int order)
{
bulletCache = this.First;
for(int i = 0; i < order; i ++)
{
bulletCache = bulletCache.Next;
}
(bulletCache.Former).Next = bulletCache.Next;
(bulletCache.Next).Former = bulletCache.Formaer;
bulletCache.Next = null;
bulletCache.Former = null;
count--;
}
}
*/
/* /*
这是一段子弹伪代码 这是一段子弹伪代码
@@ -46,13 +114,16 @@ public float[] FourierY {get; set;}
public float[] Angle {get; set;} public float[] Angle {get; set;}
public float AngleDefult {get; set;} public float AngleDefult {get; set;}
关于子弹类别的相关属性
子弹种类和缩放比例,以确定贴图纹理及其大小 子弹种类和缩放比例,以确定贴图纹理及其大小
同时还有纹理相关数据,碰撞半径 同时还有纹理相关数据,碰撞半径
readonly Enum Type; readonly Enum Type;
public float[] Size {get; set;} public float[] Size {get; set;}
public string TextureFile {get; set;} public string TextureFile {get; set;}
public void Float StrikeRadias {get; det;} public void float StrikeRadias {get; det;}
public void float GrazeRadias {get; set;}
获取波形路径数据
public void GetAngle(); public void GetAngle();
} }
@@ -86,8 +157,9 @@ this.TextureFile = TextureList[order]
this.Size[0] = DefultSizeList[order][0]; this.Size[0] = DefultSizeList[order][0];
this.Size[1] = DefultSizeList[order][1]; this.Size[1] = DefultSizeList[order][1];
将缩放比例设置添加至当前参数设置 将缩放比例设置应用至当前参数设置
this.StrikeRadias = DefultRadiasList[order] * size; this.StrikeRadias = DefultRadiasList[order] * size;
this.GrazeRadias = DefultGrazeList[order] * size;
this.Size[0] *= size; this.Size[0] *= size;
this.Size[1] *= size; this.Size[1] *= size;
} }
@@ -126,6 +198,37 @@ yMotion *= Eclipse;
return yMotion; return yMotion;
} }
public void GetAngle(float[] X, float[] Y, float angle)
{
this.FourierX = X;
this.FourierY = Y;
this.Angle = angle;
}
} }
*/
/*
一个关于数学的类
主要用于在不丢失精度的情况下简化三角函数计算的复杂度。
class SimpleMath
{
redonly int[] SineArray =
{
};
public void Sin(float x)
{
}
}
*/ */
@@ -0,0 +1 @@
7bac7edb0d2d25940c17ee6de670f2fa7160ea26
@@ -0,0 +1,3 @@
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\Code01\obj\Debug\Code01.csproj.AssemblyReference.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\Code01\obj\Debug\Code01.csproj.SuggestedBindingRedirects.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\Code01\obj\Debug\Code01.csproj.CoreCompileInputs.cache
@@ -7,6 +7,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeBlock", "CodeBlock", "{
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Code01", "Code01\Code01.csproj", "{5849875B-470A-43ED-AADF-539DED5F6CAD}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Code01", "Code01\Code01.csproj", "{5849875B-470A-43ED-AADF-539DED5F6CAD}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeTest", "CodeTest", "{015707A9-DB66-4877-89F5-3A94395FA0A4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeTest01", "CodeTest01\CodeTest01.csproj", "{FDDD9B47-CD70-4631-A4AF-FBCD44BC794E}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -17,12 +21,17 @@ Global
{5849875B-470A-43ED-AADF-539DED5F6CAD}.Debug|Any CPU.Build.0 = Debug|Any CPU {5849875B-470A-43ED-AADF-539DED5F6CAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5849875B-470A-43ED-AADF-539DED5F6CAD}.Release|Any CPU.ActiveCfg = Release|Any CPU {5849875B-470A-43ED-AADF-539DED5F6CAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5849875B-470A-43ED-AADF-539DED5F6CAD}.Release|Any CPU.Build.0 = Release|Any CPU {5849875B-470A-43ED-AADF-539DED5F6CAD}.Release|Any CPU.Build.0 = Release|Any CPU
{FDDD9B47-CD70-4631-A4AF-FBCD44BC794E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDDD9B47-CD70-4631-A4AF-FBCD44BC794E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDDD9B47-CD70-4631-A4AF-FBCD44BC794E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDDD9B47-CD70-4631-A4AF-FBCD44BC794E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{5849875B-470A-43ED-AADF-539DED5F6CAD} = {A4C61020-88DF-4729-B55C-7BB7B5DB7B2C} {5849875B-470A-43ED-AADF-539DED5F6CAD} = {A4C61020-88DF-4729-B55C-7BB7B5DB7B2C}
{FDDD9B47-CD70-4631-A4AF-FBCD44BC794E} = {015707A9-DB66-4877-89F5-3A94395FA0A4}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4F721DF6-8FC7-4EB6-A3C2-46F566621FBA} SolutionGuid = {4F721DF6-8FC7-4EB6-A3C2-46F566621FBA}
@@ -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,53 @@
<?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>{FDDD9B47-CD70-4631-A4AF-FBCD44BC794E}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>CodeTest01</RootNamespace>
<AssemblyName>CodeTest01</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="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" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodeTest01
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine(Math.PI.ToString());
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("CodeTest01")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CodeTest01")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("fddd9b47-cd70-4631-a4af-fbcd44bc794e")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [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>
@@ -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 @@
7f4b213b428f4c013f19137338418ee1f5525793
@@ -0,0 +1,8 @@
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\CodeTest01\bin\Debug\CodeTest01.exe.config
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\CodeTest01\bin\Debug\CodeTest01.exe
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\CodeTest01\bin\Debug\CodeTest01.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\CodeTest01\obj\Debug\CodeTest01.csproj.AssemblyReference.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\CodeTest01\obj\Debug\CodeTest01.csproj.SuggestedBindingRedirects.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\CodeTest01\obj\Debug\CodeTest01.csproj.CoreCompileInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\CodeTest01\obj\Debug\CodeTest01.exe
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\CodeBlock\CodeBlock\CodeTest01\obj\Debug\CodeTest01.pdb
@@ -0,0 +1 @@
obj\Debug\\_IsIncrementalBuild