chore: updated engine
This commit is contained in:
parent
5cfed3ba56
commit
9c90a804c3
2
Engine
2
Engine
@ -1 +1 @@
|
|||||||
Subproject commit 767fc28488fbbea9d1125f91934f4b882275890c
|
Subproject commit 7212094a3d8bb74d6c9baca9213d62a13cb53713
|
@ -15,8 +15,8 @@ public class CircleBehaviour : Syntriax.Engine.Physics2D.Collider2DCircleBehavio
|
|||||||
|
|
||||||
for (int i = 0; i < CIRCLE_SEGMENT_COUNT; i++)
|
for (int i = 0; i < CIRCLE_SEGMENT_COUNT; i++)
|
||||||
{
|
{
|
||||||
float iPi1 = i / CIRCLE_SEGMENT_COUNT * 2f * Math.PI;
|
float iPi1 = i / CIRCLE_SEGMENT_COUNT * 2f * Math.Pi;
|
||||||
float iPi2 = (i + 1f).Mod(CIRCLE_SEGMENT_COUNT) / CIRCLE_SEGMENT_COUNT * 2f * Math.PI;
|
float iPi2 = (i + 1f).Mod(CIRCLE_SEGMENT_COUNT) / CIRCLE_SEGMENT_COUNT * 2f * Math.Pi;
|
||||||
|
|
||||||
Vector2D firstVertex = new Vector2D(Math.Sin(iPi1), Math.Cos(iPi1)) * CircleWorld.Radius;
|
Vector2D firstVertex = new Vector2D(Math.Sin(iPi1), Math.Cos(iPi1)) * CircleWorld.Radius;
|
||||||
Vector2D secondVertex = new Vector2D(Math.Sin(iPi2), Math.Cos(iPi2)) * CircleWorld.Radius;
|
Vector2D secondVertex = new Vector2D(Math.Sin(iPi2), Math.Cos(iPi2)) * CircleWorld.Radius;
|
||||||
|
@ -86,7 +86,7 @@ public class PongManagerBehaviour : Behaviour, INetworkEntity, IFirstFrameUpdate
|
|||||||
const float AllowedRadians = 45f * Syntriax.Engine.Core.Math.DegreeToRadian;
|
const float AllowedRadians = 45f * Syntriax.Engine.Core.Math.DegreeToRadian;
|
||||||
float rotation = (float)random.NextDouble() * 2f * AllowedRadians - AllowedRadians;
|
float rotation = (float)random.NextDouble() * 2f * AllowedRadians - AllowedRadians;
|
||||||
bool isBackwards = (random.Next() % 2) == 1;
|
bool isBackwards = (random.Next() % 2) == 1;
|
||||||
return Vector2D.Right.Rotate(isBackwards ? rotation + Syntriax.Engine.Core.Math.PI : rotation);
|
return Vector2D.Right.Rotate(isBackwards ? rotation + Syntriax.Engine.Core.Math.Pi : rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPacketListenerServer<RequestStartPacket>.OnServerPacketArrived(IConnection sender, RequestStartPacket packet)
|
void IPacketListenerServer<RequestStartPacket>.OnServerPacketArrived(IConnection sender, RequestStartPacket packet)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user