Daily update on 20230413 by nitload youmu
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,5 +19,10 @@ namespace StgSharp.Control
|
|||||||
GameTimeLine._currentPool.geometryContainer.Add(geo);
|
GameTimeLine._currentPool.geometryContainer.Add(geo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Geometry(IGeometry geometry)
|
||||||
|
{
|
||||||
|
GameTimeLine._currentPool.geometryContainer.Add(geometry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace StgSharp.Control
|
|
||||||
{
|
|
||||||
public abstract class BlockOperation : INode<BlockOperation>
|
|
||||||
{
|
|
||||||
|
|
||||||
private ContainerNode<BlockOperation> _id;
|
|
||||||
|
|
||||||
|
|
||||||
ContainerNode<BlockOperation> INode<BlockOperation>.ID => _id;
|
|
||||||
|
|
||||||
void INode<BlockOperation>.setID(ContainerNode<BlockOperation> id)
|
|
||||||
{
|
|
||||||
if (_id == default)
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException("Cannot set ID twice!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public abstract void OnUpdating();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,9 +9,8 @@ namespace StgSharp.Control
|
|||||||
{
|
{
|
||||||
internal static Pool _currentPool;
|
internal static Pool _currentPool;
|
||||||
internal static LinkedList<Pool> allPool;
|
internal static LinkedList<Pool> allPool;
|
||||||
public static Counter<uint> tickCounter
|
public static Counter<uint> tickCounter = new Counter<uint>(0,1,1);
|
||||||
= new Counter<uint>(0,1,1);
|
internal static TimelineBlock currentOperation;
|
||||||
internal static BlockOperation currentOperation;
|
|
||||||
private static bool isPaused;
|
private static bool isPaused;
|
||||||
|
|
||||||
internal static void OnRender()
|
internal static void OnRender()
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace StgSharp.Control
|
||||||
|
{
|
||||||
|
public abstract class TimelineBlock : INode<TimelineBlock>
|
||||||
|
{
|
||||||
|
|
||||||
|
private ContainerNode<TimelineBlock> _id;
|
||||||
|
|
||||||
|
public abstract void OnUpdating();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace StgSharp.Entities
|
||||||
|
{
|
||||||
|
public class EliteEnemy:IEntity
|
||||||
|
{
|
||||||
|
public bool _selectalbe;
|
||||||
|
|
||||||
|
internal Launcher<EntityPartical> _awardLauncher;
|
||||||
|
internal LinkedList< Launcher<EntityPartical>> _commonBulletLauncher;
|
||||||
|
internal Launcher<EntityPartical> _dieBulletLauncher;
|
||||||
|
|
||||||
|
public Launcher<EntityPartical> AwardLauncher { get; set; }
|
||||||
|
public LinkedList<Launcher<EntityPartical>> CommonBulletLauncher { get; set; }
|
||||||
|
public Launcher<EntityPartical> DieBulletLauncher { get; set; }
|
||||||
|
|
||||||
|
internal void InternalDieOperation(Pool home)
|
||||||
|
{
|
||||||
|
_dieBulletLauncher.Launch(Control.GameTimeLine.tickCounter, home._bulletContainer);
|
||||||
|
_awardLauncher.Launch(Control.GameTimeLine.tickCounter, home._awardContainer);
|
||||||
|
this._id.Remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void OnRenderFrame()
|
||||||
|
{
|
||||||
|
this.OnUpdate();
|
||||||
|
foreach (Launcher<EntityPartical> launcher in CommonBulletLauncher)
|
||||||
|
{
|
||||||
|
launcher.Launch(Control.GameTimeLine.tickCounter, Control.GameTimeLine._currentPool._bulletContainer);
|
||||||
|
}
|
||||||
|
this.OnRender();
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void OnRender() => new NotImplementedException();
|
||||||
|
|
||||||
|
public virtual void OnUpdate() => new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,16 +4,17 @@ using System.Text;
|
|||||||
|
|
||||||
namespace StgSharp.Entities
|
namespace StgSharp.Entities
|
||||||
{
|
{
|
||||||
public class Enemy : Entity
|
public class Enemy : IEntity
|
||||||
{
|
{
|
||||||
public bool _selectalbe;
|
public bool _selectalbe;
|
||||||
|
|
||||||
public Launcher<EntityPartical> _awardLauncher;
|
internal Launcher<EntityPartical> _awardLauncher;
|
||||||
public Launcher<EntityPartical> _commonBulletLauncher;
|
internal Launcher<EntityPartical> _commonBulletLauncher;
|
||||||
public Launcher<EntityPartical> _dieBulletLauncher;
|
internal Launcher<EntityPartical> _dieBulletLauncher;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Launcher<EntityPartical> AwardLauncher { get; set; }
|
||||||
|
public Launcher<EntityPartical> CommonBulletLauncher { get; set; }
|
||||||
|
public Launcher<EntityPartical> DieBulletLauncher { get; set; }
|
||||||
|
|
||||||
internal void InternalDieOperation(Pool home)
|
internal void InternalDieOperation(Pool home)
|
||||||
{
|
{
|
||||||
@@ -22,7 +23,14 @@ namespace StgSharp.Entities
|
|||||||
this._id.Remove();
|
this._id.Remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnRender()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnUpdate()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ using System.Text;
|
|||||||
|
|
||||||
namespace StgSharp.Entities
|
namespace StgSharp.Entities
|
||||||
{
|
{
|
||||||
public class EntityPartical : Entity
|
public abstract class EntityPartical : IEntity
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,23 +6,22 @@ using System.Text;
|
|||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp
|
||||||
{
|
{
|
||||||
public class Entity:INode<Entity>
|
public abstract class IEntity:INode<IEntity>
|
||||||
{
|
{
|
||||||
internal Point _pos;
|
internal Point _pos;
|
||||||
internal IGeometry _collisionBox;
|
internal LinkedList<IGeometry> _collisionBox;
|
||||||
internal Sensor<IGeometry> _collisionSensor;
|
internal Sensor<IGeometry> _collisionSensor;
|
||||||
internal ContainerNode<Entity> _id;
|
internal string _texture;
|
||||||
internal String _texture;
|
|
||||||
internal Point _position;
|
internal Point _position;
|
||||||
internal Point _basePoint;
|
internal Point _basePoint;
|
||||||
internal GetLocationHandler _movHandler;
|
internal GetLocationHandler _movHandler;
|
||||||
|
protected uint _bornTick;
|
||||||
|
|
||||||
public IGeometry CollisionBox
|
public LinkedList<IGeometry> CollisionBox
|
||||||
{
|
{
|
||||||
get { return _collisionBox; }
|
get { return _collisionBox; }
|
||||||
set { _collisionBox = value; }
|
set { _collisionBox = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A sensor used for cheking out if a bullet hit a player or something else
|
/// A sensor used for cheking out if a bullet hit a player or something else
|
||||||
@@ -50,32 +49,12 @@ namespace StgSharp
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public float Y { get; set; }
|
public float Y { get; set; }
|
||||||
|
|
||||||
ContainerNode<Entity> INode<Entity>.ID
|
|
||||||
{
|
|
||||||
get { return _id; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetLocation(Point p)
|
public void SetLocation(Point p)
|
||||||
{
|
{
|
||||||
_pos = p;
|
_pos = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
void INode<Entity>.setID(ContainerNode<Entity> id)
|
internal abstract void OnRenderFrame();
|
||||||
{
|
|
||||||
if (id == null)
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new ArgumentException("Cannot set id twice!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnRender()
|
|
||||||
{
|
|
||||||
_position._position = _movHandler.Invoke(_basePoint._position, Control.GameTimeLine.tickCounter);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,14 +6,13 @@ using System.Text;
|
|||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp
|
||||||
{
|
{
|
||||||
public class Launcher<T>:INode<Launcher<T>> where T : Entity
|
public class Launcher<T>:INode<Launcher<T>> where T : IEntity
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
*用于发射其他的实体,主要是子弹 和 掉落物
|
*用于发射其他的实体,主要是子弹 和 掉落物
|
||||||
*/
|
*/
|
||||||
|
|
||||||
internal vec2d _center; //发射器的参考位置,运动轨迹的方程应当基于这个参考点构建
|
internal vec2d _center; //发射器的参考位置,运动轨迹的方程应当基于这个参考点构建
|
||||||
private ContainerNode<Launcher<T>> _id;
|
|
||||||
internal Counter<int> _internalParameter; //发射器的内部计时器
|
internal Counter<int> _internalParameter; //发射器的内部计时器
|
||||||
internal EntityPartical _bulletSample; //发射的子弹类型
|
internal EntityPartical _bulletSample; //发射的子弹类型
|
||||||
internal uint[] launchtick; //发射子弹的内部计时
|
internal uint[] launchtick; //发射子弹的内部计时
|
||||||
@@ -24,27 +23,12 @@ namespace StgSharp
|
|||||||
set { _bulletSample = value; }
|
set { _bulletSample = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Launch(Counter<uint> outerTickCounter, LinkedList<Entity> container)
|
internal virtual void Launch(Counter<uint> outerTickCounter, LinkedList<IEntity> container)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ContainerNode<Launcher<T>> INode<Launcher<T>>.ID
|
|
||||||
{
|
|
||||||
get { return _id; }
|
|
||||||
}
|
|
||||||
|
|
||||||
void INode<Launcher<T>>.setID(ContainerNode<Launcher<T>> id)
|
|
||||||
{
|
|
||||||
if (_id == default(ContainerNode<Launcher<T>>))
|
|
||||||
{
|
|
||||||
throw new ArgumentException();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,16 @@ using System.Text;
|
|||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp
|
||||||
{
|
{
|
||||||
public class Partical : Entity
|
public class Partical : IEntity
|
||||||
{
|
{
|
||||||
|
public override void OnRender()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnUpdate()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp
|
||||||
{
|
{
|
||||||
public class Player : Entity
|
public abstract class Player : IEntity
|
||||||
{
|
{
|
||||||
internal float _velocity;
|
internal float _velocity;
|
||||||
|
|
||||||
|
|||||||
@@ -43,21 +43,21 @@ namespace StgSharp.Geometries
|
|||||||
_center._position = _basePoint._position + MoveCenter(tick);
|
_center._position = _basePoint._position + MoveCenter(tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal sealed override void CalcVec02(vec2d vec, uint tick)
|
internal sealed override void CalcVec02(vec3d vec, uint tick)
|
||||||
{
|
{
|
||||||
_radius._position = vec + UpdateRadius(tick);
|
_radius._position = vec + UpdateRadius(tick);
|
||||||
|
|
||||||
}
|
}
|
||||||
internal sealed override void CalcVec03(StgSharp.Math.vec2d vec, uint tick)
|
internal sealed override void CalcVec03(vec3d vec, uint tick)
|
||||||
{
|
{
|
||||||
_angle._position = vec + UpdateAngle(tick);
|
_angle._position = vec + UpdateAngle(tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual vec2d MoveCenter(uint tick) => default;
|
public virtual vec3d MoveCenter(uint tick) => default;
|
||||||
|
|
||||||
public virtual vec2d UpdateRadius(uint tick) => default;
|
public virtual vec3d UpdateRadius(uint tick) => default;
|
||||||
|
|
||||||
public virtual vec2d UpdateAngle(uint tick) => default;
|
public virtual vec3d UpdateAngle(uint tick) => default;
|
||||||
|
|
||||||
internal override void OnRender(uint tick)
|
internal override void OnRender(uint tick)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ namespace StgSharp.Geometries
|
|||||||
{
|
{
|
||||||
public abstract class IGeometry:INode<IGeometry>
|
public abstract class IGeometry:INode<IGeometry>
|
||||||
{
|
{
|
||||||
internal ContainerNode<IGeometry> _id;
|
|
||||||
private readonly uint bornTick;
|
private readonly uint bornTick;
|
||||||
|
|
||||||
public abstract Point BasePoint { get; }
|
public abstract Point BasePoint { get; }
|
||||||
@@ -28,27 +27,13 @@ namespace StgSharp.Geometries
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal abstract void CalcVec01(uint tick);
|
internal abstract void CalcVec01(uint tick);
|
||||||
internal abstract void CalcVec02(vec2d vec, uint tick);
|
internal abstract void CalcVec02(vec3d vec, uint tick);
|
||||||
internal abstract void CalcVec03(vec2d vec, uint tick);
|
internal abstract void CalcVec03(vec3d vec, uint tick);
|
||||||
internal abstract void OnRender(uint tick);
|
internal abstract void OnRender(uint tick);
|
||||||
|
|
||||||
public abstract RenderMode renderMode { get; }
|
public abstract RenderMode renderMode { get; }
|
||||||
public abstract float SetArrayX();
|
public abstract float SetArrayX();
|
||||||
public abstract float SetArrayY();
|
public abstract float SetArrayY();
|
||||||
|
|
||||||
ContainerNode<IGeometry> INode<IGeometry>.ID => _id;
|
|
||||||
|
|
||||||
void INode<IGeometry>.setID(ContainerNode<IGeometry> id)
|
|
||||||
{
|
|
||||||
if (_id != default)
|
|
||||||
{
|
|
||||||
throw new ArgumentException("Cannot set id twice");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,23 @@ namespace StgSharp.Geometries
|
|||||||
{
|
{
|
||||||
public abstract class IGeometryCombination:LinkedList<IGeometry>
|
public abstract class IGeometryCombination:LinkedList<IGeometry>
|
||||||
{
|
{
|
||||||
|
internal readonly uint _bornTick;
|
||||||
|
|
||||||
|
internal abstract void toSimpleGeometry();
|
||||||
|
|
||||||
|
public IGeometryCombination(uint bornTime)
|
||||||
|
{
|
||||||
|
_bornTick = bornTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IGeometryCombination(Counter<uint> timer)
|
||||||
|
{
|
||||||
|
_bornTick = timer._value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IGeometryCombination()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,19 +50,19 @@ namespace StgSharp.Geometries
|
|||||||
_beginPoint._position = _basePoint._position + MoveBeginPoint(tick);
|
_beginPoint._position = _basePoint._position + MoveBeginPoint(tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal sealed override void CalcVec02(vec2d vec, uint tick)
|
internal sealed override void CalcVec02(vec3d vec, uint tick)
|
||||||
{
|
{
|
||||||
_endPoint._position = vec + MoveEndPoint(tick);
|
_endPoint._position = vec + MoveEndPoint(tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal sealed override void CalcVec03(vec2d vec, uint tick)
|
internal sealed override void CalcVec03(vec3d vec, uint tick)
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Lines do not need the third parameter to define!");
|
throw new ArgumentException("Lines do not need the third parameter to define!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual vec2d MoveBeginPoint(uint tick) => default;
|
public virtual vec3d MoveBeginPoint(uint tick) => default;
|
||||||
|
|
||||||
public virtual vec2d MoveEndPoint(uint tick) => default;
|
public virtual vec3d MoveEndPoint(uint tick) => default;
|
||||||
|
|
||||||
internal override void OnRender(uint tick)
|
internal override void OnRender(uint tick)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,17 +11,8 @@ namespace StgSharp.Geometries
|
|||||||
{
|
{
|
||||||
public class Point: INode<Point>
|
public class Point: INode<Point>
|
||||||
{
|
{
|
||||||
internal StgSharp.ContainerNode<Point> _id;
|
|
||||||
|
|
||||||
internal vec2d _position;
|
internal vec3d _position;
|
||||||
|
|
||||||
internal GetLocationHandler getXHandler;
|
|
||||||
internal GetLocationHandler getYHandler;
|
|
||||||
|
|
||||||
ContainerNode<Point> INode<Point>.ID
|
|
||||||
{
|
|
||||||
get { return this._id; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public float X
|
public float X
|
||||||
{
|
{
|
||||||
@@ -33,21 +24,7 @@ namespace StgSharp.Geometries
|
|||||||
get { return this._position.Y; }
|
get { return this._position.Y; }
|
||||||
}
|
}
|
||||||
|
|
||||||
void INode<Point>.setID(ContainerNode<Point> id)
|
public void Update() => new NotImplementedException();
|
||||||
{
|
|
||||||
if (id == null)
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new ArgumentException("Cannot set id twice!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnRender()
|
|
||||||
{
|
|
||||||
this.getXHandler.Invoke(this._position, Control.GameTimeLine.tickCounter);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Numerics;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace StgSharp.Geometries
|
||||||
|
{
|
||||||
|
public class Polygon : IGeometryCombination
|
||||||
|
{
|
||||||
|
internal Point[] pointsArray;
|
||||||
|
|
||||||
|
public Polygon(uint bornTime) : base(bornTime)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Polygon(int pointNum)
|
||||||
|
{
|
||||||
|
pointsArray = new Point[pointNum];
|
||||||
|
this.toSimpleGeometry();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Polygon(Point[] pointsArray)
|
||||||
|
{
|
||||||
|
PointsArray = pointsArray;
|
||||||
|
this.toSimpleGeometry();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void toSimpleGeometry()
|
||||||
|
{
|
||||||
|
Point begin = pointsArray[0];
|
||||||
|
for (int i = 1; i <= pointsArray.Length; i++)
|
||||||
|
{
|
||||||
|
Triangle a = new Triangle(this._bornTick);
|
||||||
|
this.Add(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Point[] PointsArray
|
||||||
|
{
|
||||||
|
get { return pointsArray; }
|
||||||
|
set { pointsArray = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -67,12 +67,12 @@ namespace StgSharp.Geometries
|
|||||||
_center._position = _basePoint._position + MovCenter(tick);
|
_center._position = _basePoint._position + MovCenter(tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal override void CalcVec02(vec2d vec, uint tick)
|
internal override void CalcVec02(vec3d vec, uint tick)
|
||||||
{
|
{
|
||||||
_centerToCorner1._position = vec + UpdateCTC1(tick);
|
_centerToCorner1._position = vec + UpdateCTC1(tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal override void CalcVec03(vec2d vec, uint tick)
|
internal override void CalcVec03(vec3d vec, uint tick)
|
||||||
{
|
{
|
||||||
_centerToCorner2._position = vec + UpdateCTC2(tick);
|
_centerToCorner2._position = vec + UpdateCTC2(tick);
|
||||||
if (_centerToCorner1._position.GetLength()
|
if (_centerToCorner1._position.GetLength()
|
||||||
@@ -83,10 +83,10 @@ namespace StgSharp.Geometries
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual vec2d MovCenter(uint tick)=>default(vec2d);
|
public virtual vec3d MovCenter(uint tick)=>default(vec3d);
|
||||||
|
|
||||||
public virtual vec2d UpdateCTC1(uint tick) => default(vec2d);
|
public virtual vec3d UpdateCTC1(uint tick) => default(vec3d);
|
||||||
|
|
||||||
public virtual vec2d UpdateCTC2(uint tick) => default(vec2d);
|
public virtual vec3d UpdateCTC2(uint tick) => default(vec3d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,21 +41,21 @@ namespace StgSharp.Geometries
|
|||||||
_beginPoint._position = _basePoint._position+ MovBegin(tick);
|
_beginPoint._position = _basePoint._position+ MovBegin(tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal override void CalcVec02(vec2d vec, uint tick)
|
internal override void CalcVec02(vec3d vec, uint tick)
|
||||||
{
|
{
|
||||||
_line1._position = vec + CalcSide1(tick);
|
_line1._position = vec + CalcSide1(tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal override void CalcVec03(vec2d vec, uint tick)
|
internal override void CalcVec03(vec3d vec, uint tick)
|
||||||
{
|
{
|
||||||
_line2._position = vec + CalcSide2(tick);
|
_line2._position = vec + CalcSide2(tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual vec2d MovBegin(uint tick) => default(vec2d);
|
public virtual vec3d MovBegin(uint tick) => default(vec3d);
|
||||||
|
|
||||||
public virtual vec2d CalcSide1(uint tick)=> default(vec2d);
|
public virtual vec3d CalcSide1(uint tick)=> default(vec3d);
|
||||||
|
|
||||||
public virtual vec2d CalcSide2(uint tick) => default(vec2d);
|
public virtual vec3d CalcSide2(uint tick) => default(vec3d);
|
||||||
|
|
||||||
internal override sealed void OnRender(uint tick)
|
internal override sealed void OnRender(uint tick)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,11 +5,22 @@ using System.Text;
|
|||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp
|
||||||
{
|
{
|
||||||
public interface INode<T> where T : INode<T>
|
public abstract class INode<T> where T : INode<T>
|
||||||
{
|
{
|
||||||
|
protected ContainerNode<T> _id;
|
||||||
internal ContainerNode<T> ID { get; }
|
internal ContainerNode<T> ID { get; }
|
||||||
|
|
||||||
internal void setID(ContainerNode<T> id);
|
internal void setID(ContainerNode<T> id)
|
||||||
|
{
|
||||||
|
if (_id!=null)
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Cannot set ID twice");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_id = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace StgSharp
|
namespace StgSharp
|
||||||
{
|
{
|
||||||
public class Counter<T>where T:struct, IConvertible, IFormattable, IComparable
|
public class Counter<T> where T:struct, IConvertible, IFormattable, IComparable
|
||||||
{
|
{
|
||||||
internal readonly dynamic _defualtValue;
|
internal readonly dynamic _defualtValue;
|
||||||
internal readonly dynamic _defualtAddValue;
|
internal readonly dynamic _defualtAddValue;
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ namespace StgSharp
|
|||||||
set { _tail = new ContainerNode<T>(value); }
|
set { _tail = new ContainerNode<T>(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
ContainerNode<LinkedList<T>> INode<LinkedList<T>>.ID => _id;
|
|
||||||
|
|
||||||
public void Add(T t)
|
public void Add(T t)
|
||||||
{
|
{
|
||||||
if (_first != default(ContainerNode<T>))
|
if (_first != default(ContainerNode<T>))
|
||||||
@@ -70,17 +68,5 @@ namespace StgSharp
|
|||||||
{
|
{
|
||||||
return new LinkedListEnumrator<T>(this);
|
return new LinkedListEnumrator<T>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void INode<LinkedList<T>>.setID(ContainerNode<LinkedList<T>> id)
|
|
||||||
{
|
|
||||||
if (_id == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentException("Cannot set ID twice");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ namespace StgSharp
|
|||||||
{
|
{
|
||||||
internal LinkedList<Point> pointContainer;
|
internal LinkedList<Point> pointContainer;
|
||||||
internal LinkedList<IGeometry> geometryContainer;
|
internal LinkedList<IGeometry> geometryContainer;
|
||||||
internal LinkedList<Entity> _bulletContainer;
|
internal LinkedList<IEntity> _bulletContainer;
|
||||||
internal LinkedList<Entity> _awardContainer;
|
internal LinkedList<IEntity> _awardContainer;
|
||||||
internal LinkedList<Entity> _enemyContainer;
|
internal LinkedList<IEntity> _enemyContainer;
|
||||||
|
|
||||||
internal Line leftBoader;
|
internal Line leftBoader;
|
||||||
internal Line rightBoader;
|
internal Line rightBoader;
|
||||||
@@ -45,9 +45,6 @@ namespace StgSharp
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ContainerNode<Pool> INode<Pool>.ID => _id;
|
|
||||||
|
|
||||||
public void OnRender()
|
public void OnRender()
|
||||||
{
|
{
|
||||||
foreach (Enemy e in _enemyContainer)
|
foreach (Enemy e in _enemyContainer)
|
||||||
@@ -56,17 +53,7 @@ namespace StgSharp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void INode<Pool>.setID(ContainerNode<Pool> id)
|
|
||||||
{
|
|
||||||
if (_id == default)
|
|
||||||
{
|
|
||||||
_id = id;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new ArgumentException("Cannot set ID twicee!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.Contracts;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace StgSharp.Optimization
|
||||||
|
{
|
||||||
|
[StructLayout(LayoutKind.Explicit,Size =16)]
|
||||||
|
public struct m128
|
||||||
|
{
|
||||||
|
[FieldOffset(0)] public float float0;
|
||||||
|
[FieldOffset(4)] public float float1;
|
||||||
|
[FieldOffset(8)] public float float2;
|
||||||
|
[FieldOffset(12)] public float float3;
|
||||||
|
|
||||||
|
[FieldOffset(0)] public double double0;
|
||||||
|
[FieldOffset(8)] public double double1;
|
||||||
|
|
||||||
|
[FieldOffset(0)] public int int0;
|
||||||
|
[FieldOffset(1)] public int int1;
|
||||||
|
[FieldOffset(2)] public int int2;
|
||||||
|
[FieldOffset(3)] public int int3;
|
||||||
|
|
||||||
|
[FieldOffset(0)] public byte byte0;
|
||||||
|
[FieldOffset(1)] public byte byte1;
|
||||||
|
[FieldOffset(2)] public byte byte2;
|
||||||
|
[FieldOffset(3)] public byte byte3;
|
||||||
|
[FieldOffset(4)] public byte byte4;
|
||||||
|
[FieldOffset(5)] public byte byte5;
|
||||||
|
[FieldOffset(6)] public byte byte6;
|
||||||
|
[FieldOffset(7)] public byte byte7;
|
||||||
|
[FieldOffset(8)] public byte byte8;
|
||||||
|
[FieldOffset(9)] public byte byte9;
|
||||||
|
[FieldOffset(10)] public byte byte10;
|
||||||
|
[FieldOffset(11)] public byte byte11;
|
||||||
|
[FieldOffset(12)] public byte byte12;
|
||||||
|
[FieldOffset(13)] public byte byte13;
|
||||||
|
[FieldOffset(14)] public byte byte14;
|
||||||
|
[FieldOffset(15)] public byte byte15;
|
||||||
|
[FieldOffset(16)] public byte byte16;
|
||||||
|
|
||||||
|
|
||||||
|
public int[] ToIntArray()
|
||||||
|
{
|
||||||
|
return new int[4] { int0, int1, int2, int3 };
|
||||||
|
}
|
||||||
|
|
||||||
|
public float[] ToFloatArray()
|
||||||
|
{
|
||||||
|
return new float[4] { float0, float1, float2, float3 };
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] ToByteArray()
|
||||||
|
{
|
||||||
|
return new byte[16]
|
||||||
|
{
|
||||||
|
byte0, byte1, byte2, byte3,
|
||||||
|
byte4, byte5, byte6, byte7,
|
||||||
|
byte8, byte9, byte10, byte11,
|
||||||
|
byte12, byte13, byte14, byte15,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
d9fddb3184a4632597eeeb36380d494aa4b8420f
|
96b7e2fc11bda4a0584ab313be1a6838a308d265
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
"privateAssets": "all"
|
"privateAssets": "all"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.101\\RuntimeIdentifierGraph.json"
|
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.104\\RuntimeIdentifierGraph.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,7 +219,7 @@
|
|||||||
"privateAssets": "all"
|
"privateAssets": "all"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.101\\RuntimeIdentifierGraph.json"
|
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.104\\RuntimeIdentifierGraph.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"dgSpecHash": "E+9DVhmJD3iKjwnjVgkXQe4WBAHxK66OG5RQDU+mTSvAaJhypgeRYBYqAJ0ou3rs/5+fuoCbzhodIhbFOCCYPQ==",
|
"dgSpecHash": "b7aEyowdGs09IzFAv3MOrx4rzMEcigh5hl+s/yyP7FKdo0cO9N5KIV8YfZMV12QhBrdbtC46iQeAJmDZsWljEg==",
|
||||||
"success": true,
|
"success": true,
|
||||||
"projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj",
|
"projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj",
|
||||||
"expectedPackageFiles": [
|
"expectedPackageFiles": [
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ internal class Program
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class MyNum : INode<MyNum>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -62,19 +62,19 @@
|
|||||||
"downloadDependencies": [
|
"downloadDependencies": [
|
||||||
{
|
{
|
||||||
"name": "Microsoft.AspNetCore.App.Ref",
|
"name": "Microsoft.AspNetCore.App.Ref",
|
||||||
"version": "[6.0.12, 6.0.12]"
|
"version": "[6.0.15, 6.0.15]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Microsoft.NETCore.App.Host.win-x64",
|
"name": "Microsoft.NETCore.App.Host.win-x64",
|
||||||
"version": "[6.0.12, 6.0.12]"
|
"version": "[6.0.15, 6.0.15]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Microsoft.NETCore.App.Ref",
|
"name": "Microsoft.NETCore.App.Ref",
|
||||||
"version": "[6.0.12, 6.0.12]"
|
"version": "[6.0.15, 6.0.15]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Microsoft.WindowsDesktop.App.Ref",
|
"name": "Microsoft.WindowsDesktop.App.Ref",
|
||||||
"version": "[6.0.12, 6.0.12]"
|
"version": "[6.0.15, 6.0.15]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"frameworkReferences": {
|
"frameworkReferences": {
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
"privateAssets": "all"
|
"privateAssets": "all"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.101\\RuntimeIdentifierGraph.json"
|
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.104\\RuntimeIdentifierGraph.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
"privateAssets": "all"
|
"privateAssets": "all"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.101\\RuntimeIdentifierGraph.json"
|
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.104\\RuntimeIdentifierGraph.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,19 +225,19 @@
|
|||||||
"downloadDependencies": [
|
"downloadDependencies": [
|
||||||
{
|
{
|
||||||
"name": "Microsoft.AspNetCore.App.Ref",
|
"name": "Microsoft.AspNetCore.App.Ref",
|
||||||
"version": "[6.0.12, 6.0.12]"
|
"version": "[6.0.15, 6.0.15]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Microsoft.NETCore.App.Host.win-x64",
|
"name": "Microsoft.NETCore.App.Host.win-x64",
|
||||||
"version": "[6.0.12, 6.0.12]"
|
"version": "[6.0.15, 6.0.15]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Microsoft.NETCore.App.Ref",
|
"name": "Microsoft.NETCore.App.Ref",
|
||||||
"version": "[6.0.12, 6.0.12]"
|
"version": "[6.0.15, 6.0.15]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Microsoft.WindowsDesktop.App.Ref",
|
"name": "Microsoft.WindowsDesktop.App.Ref",
|
||||||
"version": "[6.0.12, 6.0.12]"
|
"version": "[6.0.15, 6.0.15]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"frameworkReferences": {
|
"frameworkReferences": {
|
||||||
@@ -245,7 +245,7 @@
|
|||||||
"privateAssets": "all"
|
"privateAssets": "all"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.101\\RuntimeIdentifierGraph.json"
|
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.104\\RuntimeIdentifierGraph.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"dgSpecHash": "USQa9TRIOFrOtueb6s3fk/PEhZUaWdhZR7Ecxnxq9Zj3HUHBl/Kuh4G3rNG9QtA7ZKOVStap7P4CP93BwoPfFg==",
|
"dgSpecHash": "IOdj9Wl7bXRmrLhrs9zCVYzAAmO7CNv7OiL/xB3b75SDQc9Fs7AWXgdHQWQMAbsMSyZOUKmIfqFpw00u7EFM3A==",
|
||||||
"success": true,
|
"success": true,
|
||||||
"projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharpDebug\\StgSharpDebug.csproj",
|
"projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharpDebug\\StgSharpDebug.csproj",
|
||||||
"expectedPackageFiles": [
|
"expectedPackageFiles": [
|
||||||
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512",
|
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512",
|
||||||
"C:\\Users\\Nitlo\\.nuget\\packages\\steamworks.net\\20.1.0\\steamworks.net.20.1.0.nupkg.sha512",
|
"C:\\Users\\Nitlo\\.nuget\\packages\\steamworks.net\\20.1.0\\steamworks.net.20.1.0.nupkg.sha512",
|
||||||
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.netcore.app.host.win-x64\\6.0.12\\microsoft.netcore.app.host.win-x64.6.0.12.nupkg.sha512",
|
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.netcore.app.host.win-x64\\6.0.15\\microsoft.netcore.app.host.win-x64.6.0.15.nupkg.sha512",
|
||||||
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.aspnetcore.app.ref\\6.0.12\\microsoft.aspnetcore.app.ref.6.0.12.nupkg.sha512",
|
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.aspnetcore.app.ref\\6.0.15\\microsoft.aspnetcore.app.ref.6.0.15.nupkg.sha512",
|
||||||
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windowsdesktop.app.ref\\6.0.12\\microsoft.windowsdesktop.app.ref.6.0.12.nupkg.sha512",
|
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windowsdesktop.app.ref\\6.0.15\\microsoft.windowsdesktop.app.ref.6.0.15.nupkg.sha512",
|
||||||
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.netcore.app.ref\\6.0.12\\microsoft.netcore.app.ref.6.0.12.nupkg.sha512"
|
"C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.netcore.app.ref\\6.0.15\\microsoft.netcore.app.ref.6.0.15.nupkg.sha512"
|
||||||
],
|
],
|
||||||
"logs": []
|
"logs": []
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user