daily update on 20230529 by nitload youmu
This commit is contained in:
@@ -11,7 +11,7 @@ namespace StgSharp
|
||||
{
|
||||
public class Pool:INode<Pool>
|
||||
{
|
||||
internal LinkedList<Point> pointContainer;
|
||||
internal LinkedList<Point> _pointContainer;
|
||||
internal LinkedList<IPlainGeometry> geometryContainer;
|
||||
internal LinkedList<IEntity> _bulletContainer;
|
||||
internal LinkedList<IEntity> _awardContainer;
|
||||
@@ -27,78 +27,19 @@ namespace StgSharp
|
||||
public Line TopBoarder => topBoader;
|
||||
public Line BottomBoarder => bottomBoader;
|
||||
|
||||
internal Sensor<EntityPartical> Sensor;
|
||||
|
||||
#if DEBUG
|
||||
public Pool()
|
||||
internal Pool()
|
||||
{
|
||||
initContainers();
|
||||
Console.WriteLine("Pool init OK!");
|
||||
}
|
||||
#endif
|
||||
|
||||
public Pool(Line left, Line right, Line top, Line bottom)
|
||||
{
|
||||
initContainers();
|
||||
topBoader = top;
|
||||
bottomBoader= bottom;
|
||||
rightBoader = right;
|
||||
leftBoader = left;
|
||||
}
|
||||
|
||||
|
||||
public Pool( Geometries.Rectangle area)
|
||||
{
|
||||
vec3d vec = area.vertex01.Position - area.vertex02.Position;
|
||||
if ((vec.X==0||vec.Y==0)&&vec.Z==0)
|
||||
{
|
||||
Line[] barders = area.GetAllSides();
|
||||
if (area.vertex01.X>0)
|
||||
{
|
||||
if (area.vertex01.Y>0)
|
||||
{
|
||||
topBoader = barders[3];
|
||||
rightBoader = barders[0];
|
||||
bottomBoader = barders[1];
|
||||
leftBoader = barders[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
topBoader = barders[2];
|
||||
rightBoader = barders[3];
|
||||
bottomBoader = barders[0];
|
||||
leftBoader = barders[1];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (area.vertex01.Y > 0)
|
||||
{
|
||||
topBoader = barders[3];
|
||||
rightBoader = barders[0];
|
||||
bottomBoader = barders[1];
|
||||
leftBoader = barders[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
topBoader = barders[2];
|
||||
rightBoader = barders[3];
|
||||
bottomBoader = barders[0];
|
||||
leftBoader = barders[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
initContainers();
|
||||
}
|
||||
|
||||
private void initContainers()
|
||||
{
|
||||
_id = new ContainerNode<Pool>(this);
|
||||
pointContainer = new LinkedList<Point>();
|
||||
_pointContainer = new LinkedList<Point>();
|
||||
_bulletContainer = new LinkedList<IEntity>();
|
||||
_awardContainer = new LinkedList<IEntity>();
|
||||
_enemyContainer = new LinkedList<IEntity>();
|
||||
|
||||
geometryContainer = new LinkedList<IPlainGeometry>();
|
||||
}
|
||||
|
||||
public void OnRender()
|
||||
|
||||
Reference in New Issue
Block a user