chore: Cleanup

This commit is contained in:
Syntriax 2024-07-14 23:22:30 +03:00
parent 01668c7be3
commit 2565617ff9
2 changed files with 0 additions and 13 deletions

View File

@ -42,7 +42,6 @@ public class BallBehaviour : NetworkBehaviour, IMonoGameContentLoader
rigidBody = foundRigidBody;
communicator = foundCommunicator;
communicator.Listener.PeerConnectedEvent += PeerConnected;
if (GameObject.GameManager.TryFindBehaviour(out PongManagerBehaviour? pongManager))
{
pongManager.OnReset += ResetBall;
@ -51,13 +50,6 @@ public class BallBehaviour : NetworkBehaviour, IMonoGameContentLoader
}
}
private void PeerConnected(NetPeer peer)
{
if (!IsServer)
return;
if (communicator.Manager.ConnectedPeersCount == 1)
}
private void DisableBall(PongManagerBehaviour pongManager)
{
BehaviourController.GameObject.Transform.Position = Vector2D.Zero;

View File

@ -74,9 +74,4 @@ public class PaddleBehaviour(Keys Up, Keys Down, float High, float Low, float Sp
private void OnUpReleased(IButtonInputs<Keys> inputs, Keys keys) => isUpPressed = false;
private void OnDownPressed(IButtonInputs<Keys> inputs, Keys keys) => isDownPressed = true;
private void OnDownReleased(IButtonInputs<Keys> inputs, Keys keys) => isDownPressed = false;
protected override void OnMessageReceived(NetPacketReader reader, NetPeer peer)
{
Transform.Position = reader.GetVector2D();
}
}