refactor: entity packets now directly go into the target entity
This commit is contained in:
@@ -80,11 +80,9 @@ public class PaddleBehaviour(Keys Up, Keys Down, float High, float Low, float Sp
|
||||
|
||||
public void OnClientPacketArrived(PaddleKeyStatePacket packet)
|
||||
{
|
||||
if (packet.EntityId.CompareTo(Id) != 0)
|
||||
return;
|
||||
|
||||
isUpPressed = packet.IsUpPressed;
|
||||
isDownPressed = packet.IsDownPressed;
|
||||
|
||||
if (!isUpPressed && !isDownPressed)
|
||||
Transform.Position.TweenVector2D(tweenManager, .05f, packet.Position, x => Transform.Position = x);
|
||||
else
|
||||
|
Reference in New Issue
Block a user