Daily upload on 20221019.

This commit is contained in:
Youmu Konpaku
2022-10-20 02:11:34 +08:00
parent 01de763a28
commit ef34fcf3c1
50 changed files with 231 additions and 18 deletions
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Game")]
[assembly: AssemblyTitle("StgSharp_Game")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Game")]
[assembly: AssemblyProduct("StgSharp_Game")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -7,8 +7,8 @@
<ProjectGuid>{57017F07-7412-4B61-B912-B1D36C3AF16F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Game</RootNamespace>
<AssemblyName>Game</AssemblyName>
<RootNamespace>StgSharp_Game</RootNamespace>
<AssemblyName>StgSharp_Game</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
@@ -1,10 +1,10 @@
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\bin\Debug\Game.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\bin\Debug\Game.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\bin\Debug\OpenTK.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\bin\Debug\OpenTK.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\bin\Debug\OpenTK.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\obj\Debug\StgSharp_Game.csproj.AssemblyReference.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\obj\Debug\StgSharp_Game.csproj.CoreCompileInputs.cache
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\obj\Debug\StgSharp_Game.csproj.CopyComplete
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\obj\Debug\Game.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\obj\Debug\Game.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\bin\Debug\StgSharp_Game.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\bin\Debug\StgSharp_Game.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\obj\Debug\StgSharp_Game.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\Game\obj\Debug\StgSharp_Game.pdb
@@ -1,4 +1,7 @@
using StgSharp_Entity;
using OpenTK;
using OpenTK.Input;
using StgSharp_Entity;
using StgSharp_Logic;
using System;
using System.Collections.Generic;
@@ -24,6 +27,8 @@ namespace StgSharp
container.Add(new Bullet());
}
container.ReportCapacity();
Console.WriteLine(Key.A.ToString());
}
}
}
@@ -137,9 +137,35 @@ namespace StgSharp_Entity
{
}
public void ChangeVelocity()
/// <summary>
/// 修改自身路径,修改条件由外部逻辑判断触发
/// </summary>
public void ChangeVelocity(float[] newXSpeed,float[] newYSpeed)
{
if (newXSpeed != null)
{
if (newXSpeed.Length == 10)
{
this._xVelocity = newXSpeed;
}
else
{
throw new Exception("The amount of parameters should be 10!");
}
}
if (newYSpeed != null)
{
if (newYSpeed.Length == 10)
{
this._yVelocity = newYSpeed;
}
else
{
throw new Exception("The amount of parameters should be 10!");
}
}
}
}
}
}
@@ -0,0 +1,181 @@
using OpenTK;
using OpenTK.Input;
using StgSharp_Entity;
using StgSharp_Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp_Entity
{
internal class Player:LinkedTarget
{
private uint gameTick;
private uint beginTick;
private readonly float _velocityHigh;
private readonly float _vHighCorner;
public float VelocityHigh
{
get { return _velocityHigh; }
}
private readonly float _velocityLow;
private readonly float _vLowCorner;
public float VelocityLow
{
get { return _velocityLow; }
}
private float _xLocation;
public float XLocation
{
get { return _xLocation; }
set { _xLocation = value; }
}
public float _yLocation;
public float YLocation
{
get { return _yLocation; }
set { _yLocation = 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;
}
public void Action()
{
if (_keyboardState.IsAnyKeyDown)
{
Move();
}
}
/// <summary>
/// 自机移动的简单方法
/// </summary>
public void Move()
{
if (_keyboardState.IsKeyDown(Key.ShiftLeft))
{
if (_keyboardState.IsKeyDown(Key.Up))
{
if (_keyboardState.IsKeyDown(Key.Left))
{
this._yLocation += _vLowCorner;
this._xLocation -= _vLowCorner;
}
else if (_keyboardState.IsKeyDown(Key.Right))
{
this._yLocation += _vLowCorner;
this._xLocation += _vLowCorner;
}
else
{
this._yLocation += _velocityLow;
}
}
else if (_keyboardState.IsKeyDown(Key.Down))
{
if (_keyboardState.IsKeyDown(Key.Left))
{
this._yLocation -= _vLowCorner;
this._xLocation -= _vLowCorner;
}
else if (_keyboardState.IsKeyDown(Key.Right))
{
this._yLocation -= _vLowCorner;
this._xLocation += _vLowCorner;
}
else
{
this._yLocation -= _velocityLow;
}
}
}
else
{
if (_keyboardState.IsKeyDown(Key.Up))
{
if (_keyboardState.IsKeyDown(Key.Left))
{
this._yLocation += _vHighCorner;
this._xLocation -= _vHighCorner;
}
else if (_keyboardState.IsKeyDown(Key.Right))
{
this._yLocation += _vHighCorner;
this._xLocation += _vHighCorner;
}
else
{
this._yLocation += _velocityHigh;
}
}
else if (_keyboardState.IsKeyDown(Key.Down))
{
if (_keyboardState.IsKeyDown(Key.Left))
{
this._yLocation -= _vHighCorner;
this._xLocation -= _vHighCorner;
}
else if (_keyboardState.IsKeyDown(Key.Right))
{
this._yLocation -= _vHighCorner;
this._xLocation += _vHighCorner;
}
else
{
this._yLocation -= _velocityHigh;
}
}
}
}
public void UseSkill(KeyboardState key)
{
if (key.IsKeyDown(Key.X))
{
}
}
public void LaunchBullet(KeyboardState key)
{
}
public void Die()
{
}
}
}
@@ -45,6 +45,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Bullet.cs" />
<Compile Include="Player.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
@@ -1 +1 @@
9f3d72d61544f629ca17662eb1b4507364353c8b
2d5905d44084acf7b24064935643d53ef7c88707
@@ -108,7 +108,7 @@ namespace StgSharp_Logic
if (_cache==target)
{
Remove(target);
a = true;
a = false;
_amountCounter.Value--;
}
}
@@ -14,7 +14,7 @@ namespace StgSharp_Logic
{
get { return _previous; }
set {
//if (this.GetType().FullName == value.GetType().FullName)
if (value==null||this.GetType().FullName == value.GetType().FullName)
{
_previous = value;
}
@@ -27,7 +27,7 @@ namespace StgSharp_Logic
{
get { return _next; }
set {
//if (this.GetType().FullName==value.GetType().FullName)
if (value == null || this.GetType().FullName==value.GetType().FullName)
{
_next = value;
}
@@ -1 +1 @@
84e8b54631a157cd484f38b0f77768efef40e58b
db769c63e34adb286b6eefdc1550008efc594664
@@ -1,8 +1,6 @@
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\bin\Debug\StgSharp_Logic.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\bin\Debug\StgSharp_Logic.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\bin\Debug\Game.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\bin\Debug\OpenTK.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\bin\Debug\Game.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\bin\Debug\OpenTK.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\bin\Debug\OpenTK.xml
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\obj\Debug\StgSharp_Logic.csproj.AssemblyReference.cache
@@ -10,3 +8,5 @@ D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Fra
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\obj\Debug\StgSharp_Logic.csproj.CopyComplete
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\obj\Debug\StgSharp_Logic.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\obj\Debug\StgSharp_Logic.pdb
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\bin\Debug\StgSharp_Game.dll
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\.Net Framework\STGSharp\StgSharp_Logic\bin\Debug\StgSharp_Game.pdb