Daily update on 20221106 by nitload youmu

This commit is contained in:
Nitload
2022-11-07 02:27:08 +08:00
parent f9dad43383
commit 64d4d2534e
13 changed files with 44 additions and 18 deletions
@@ -13,7 +13,7 @@ namespace StgSharp.Control
{
static public class Create
{
private static LinkedObject cache;
@@ -91,13 +91,12 @@ namespace StgSharp.Control
PointCommon p = new PointCommon(beginX, beginY, angle,Pool.tickCounter);
p.XVelocity = x;
p.YVelocity = y;
Pool.pointPool.mainCotainer.Add(p);
Pool.pointContainer.Add(p);
}
public static void Circle(IPoint c, float r)
{
Pool.
{
}
}
}
@@ -24,17 +24,25 @@ namespace StgSharp.Control
= new Collector(side.right,600);
internal static IContainer entityContainer
= new EntityContainer(topCollector,bottomCollector,leftCollector,rightCollector) ;
internal static Counter<uint> entityCounter
=new Counter<uint>();
internal static LinkedList entityContainer
= new LinkedList(entityCounter);
internal static IContainer bulletContainer
= new EntityContainer(topCollector, bottomCollector, leftCollector, rightCollector);
internal static Counter<uint> bulletCounter
=new Counter<uint>();
internal static LinkedList bulletContainer
= new LinkedList(bulletCounter);
internal static IContainer geometryContainer
= new GeometryContainer(topCollector, bottomCollector, leftCollector, rightCollector) ;
internal static Counter<uint> gemoetryCounter
=new Counter<uint>();
internal static LinkedList geometryContainer
= new LinkedList(gemoetryCounter);
internal static IContainer pointContainer
= new PointContainer(topCollector, bottomCollector, leftCollector, rightCollector) ;
internal static Counter<uint> pointCounter
=new Counter<uint>();
internal static LinkedList pointContainer
= new LinkedList(pointCounter);
static Pool()
{
@@ -10,7 +10,7 @@ namespace StgSharp.Entity
{
public class Bullet : LinkedObject
{
private IPoint _location;
internal IPoint _location;
public IPoint Location
{
@@ -18,8 +18,8 @@ namespace StgSharp.Entity
set { _location = value; }
}
private float _x;
private float _y;
internal float _x;
internal float _y;
public float X
{
@@ -11,6 +11,10 @@ namespace StgSharp.Game
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; }
@@ -16,6 +16,14 @@ namespace StgSharp.Logic
set { _value = value; }
}
private T _max;
public T Max
{
get { return _max; }
set { _max = value; }
}
public Counter()
{
@@ -23,12 +31,14 @@ namespace StgSharp.Logic
public void Increase(T deltaValue)
{
//_value += deltaValue;
}
public void Decrease(T deltaValue)
{
//_value -= deltaValue;
}
}
}
@@ -35,10 +35,13 @@ namespace StgSharp.Logic
set { _amountCounter = value; }
}
//构造器
public LinkedList()
/// <summary>
/// 构造一个专用链表,并将计数器传入
/// </summary>
/// <param name="counter"></param>
public LinkedList(Counter<uint> counter)
{
this._amountCounter = new Counter<uint>();
_amountCounter = counter;
_amountCounter.Value = 0;
_heading = null;
}
@@ -93,6 +96,8 @@ namespace StgSharp.Logic
_amountCounter.Value--;
}
/// <summary>
/// 该方法用于防止传入不属于该链表的实例。
/// </summary>