diff --git a/Assets/Scripts/Net/CanvasInput.cs b/Assets/Scripts/Networking/CanvasInput.cs similarity index 96% rename from Assets/Scripts/Net/CanvasInput.cs rename to Assets/Scripts/Networking/CanvasInput.cs index 84cec5d..6a4d447 100644 --- a/Assets/Scripts/Net/CanvasInput.cs +++ b/Assets/Scripts/Networking/CanvasInput.cs @@ -2,10 +2,10 @@ using UnityEngine; using UnityEngine.UI; using NeonTea.Quakeball.TeaNet.Peers; -using NeonTea.Quakeball.Net.Packets; +using NeonTea.Quakeball.Networking.Packets; using System; -namespace NeonTea.Quakeball.Net { +namespace NeonTea.Quakeball.Networking { public class CanvasInput : MonoBehaviour, PeerMessageListener { public Button Host; public Button Join; diff --git a/Assets/Scripts/Net/CanvasInput.cs.meta b/Assets/Scripts/Networking/CanvasInput.cs.meta similarity index 100% rename from Assets/Scripts/Net/CanvasInput.cs.meta rename to Assets/Scripts/Networking/CanvasInput.cs.meta diff --git a/Assets/Scripts/Net/GameProtocol.cs b/Assets/Scripts/Networking/GameProtocol.cs similarity index 90% rename from Assets/Scripts/Net/GameProtocol.cs rename to Assets/Scripts/Networking/GameProtocol.cs index f7cc225..1b6c4fb 100644 --- a/Assets/Scripts/Net/GameProtocol.cs +++ b/Assets/Scripts/Networking/GameProtocol.cs @@ -3,10 +3,10 @@ using System; using UnityEngine; using NeonTea.Quakeball.TeaNet.Peers; using NeonTea.Quakeball.TeaNet.Packets; -using NeonTea.Quakeball.Net.Packets; -using NeonTea.Quakeball.Net.Instances; +using NeonTea.Quakeball.Networking.Packets; +using NeonTea.Quakeball.Networking.Instances; -namespace NeonTea.Quakeball.Net { +namespace NeonTea.Quakeball.Networking { public class GameProtocol : Protocol { public override byte Identifier => 0x7A; diff --git a/Assets/Scripts/Net/GameProtocol.cs.meta b/Assets/Scripts/Networking/GameProtocol.cs.meta similarity index 100% rename from Assets/Scripts/Net/GameProtocol.cs.meta rename to Assets/Scripts/Networking/GameProtocol.cs.meta diff --git a/Assets/Scripts/Net/Instances.meta b/Assets/Scripts/Networking/Instances.meta similarity index 100% rename from Assets/Scripts/Net/Instances.meta rename to Assets/Scripts/Networking/Instances.meta diff --git a/Assets/Scripts/Net/Instances/Client.cs b/Assets/Scripts/Networking/Instances/Client.cs similarity index 97% rename from Assets/Scripts/Net/Instances/Client.cs rename to Assets/Scripts/Networking/Instances/Client.cs index b56bc34..0ef9a1a 100644 --- a/Assets/Scripts/Net/Instances/Client.cs +++ b/Assets/Scripts/Networking/Instances/Client.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using UnityEngine; using NeonTea.Quakeball.Player; -using NeonTea.Quakeball.Net.Packets; +using NeonTea.Quakeball.Networking.Packets; using NeonTea.Quakeball.Interface; using NeonTea.Quakeball.TeaNet.Peers; using NeonTea.Quakeball.TeaNet.Packets; -namespace NeonTea.Quakeball.Net.Instances { +namespace NeonTea.Quakeball.Networking.Instances { public class Client : NetInstance { private NetChaperone Net; diff --git a/Assets/Scripts/Net/Instances/Client.cs.meta b/Assets/Scripts/Networking/Instances/Client.cs.meta similarity index 100% rename from Assets/Scripts/Net/Instances/Client.cs.meta rename to Assets/Scripts/Networking/Instances/Client.cs.meta diff --git a/Assets/Scripts/Net/Instances/NetInstance.cs b/Assets/Scripts/Networking/Instances/NetInstance.cs similarity index 90% rename from Assets/Scripts/Net/Instances/NetInstance.cs rename to Assets/Scripts/Networking/Instances/NetInstance.cs index ab41ef4..a9fb0c0 100644 --- a/Assets/Scripts/Net/Instances/NetInstance.cs +++ b/Assets/Scripts/Networking/Instances/NetInstance.cs @@ -1,11 +1,11 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -using NeonTea.Quakeball.Net.Packets; +using NeonTea.Quakeball.Networking.Packets; using NeonTea.Quakeball.TeaNet.Peers; using NeonTea.Quakeball.TeaNet.Packets; -namespace NeonTea.Quakeball.Net.Instances { +namespace NeonTea.Quakeball.Networking.Instances { public abstract class NetInstance { protected static byte[] Fingerprint = new byte[] { 0xFF, 0xF7 }; diff --git a/Assets/Scripts/Net/Instances/NetInstance.cs.meta b/Assets/Scripts/Networking/Instances/NetInstance.cs.meta similarity index 100% rename from Assets/Scripts/Net/Instances/NetInstance.cs.meta rename to Assets/Scripts/Networking/Instances/NetInstance.cs.meta diff --git a/Assets/Scripts/Net/Instances/Server.cs b/Assets/Scripts/Networking/Instances/Server.cs similarity index 97% rename from Assets/Scripts/Net/Instances/Server.cs rename to Assets/Scripts/Networking/Instances/Server.cs index 9614c22..eb1cea1 100644 --- a/Assets/Scripts/Net/Instances/Server.cs +++ b/Assets/Scripts/Networking/Instances/Server.cs @@ -1,13 +1,13 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -using NeonTea.Quakeball.Net.Packets; +using NeonTea.Quakeball.Networking.Packets; using NeonTea.Quakeball.Player; using NeonTea.Quakeball.Interface; using NeonTea.Quakeball.TeaNet.Peers; using NeonTea.Quakeball.TeaNet.Packets; -namespace NeonTea.Quakeball.Net.Instances { +namespace NeonTea.Quakeball.Networking.Instances { public class Server : NetInstance { private NetChaperone Net; diff --git a/Assets/Scripts/Net/Instances/Server.cs.meta b/Assets/Scripts/Networking/Instances/Server.cs.meta similarity index 100% rename from Assets/Scripts/Net/Instances/Server.cs.meta rename to Assets/Scripts/Networking/Instances/Server.cs.meta diff --git a/Assets/Scripts/Net/Net.cs b/Assets/Scripts/Networking/Net.cs similarity index 90% rename from Assets/Scripts/Net/Net.cs rename to Assets/Scripts/Networking/Net.cs index c302d86..185d184 100644 --- a/Assets/Scripts/Net/Net.cs +++ b/Assets/Scripts/Networking/Net.cs @@ -1,9 +1,9 @@ using UnityEngine; -using NeonTea.Quakeball.Net.Instances; +using NeonTea.Quakeball.Networking.Instances; using NeonTea.Quakeball.TeaNet.Peers; using System.Collections.Generic; -namespace NeonTea.Quakeball.Net { +namespace NeonTea.Quakeball.Networking { public class Net { public static Net Singleton = new Net(); diff --git a/Assets/Scripts/Net/Net.cs.meta b/Assets/Scripts/Networking/Net.cs.meta similarity index 100% rename from Assets/Scripts/Net/Net.cs.meta rename to Assets/Scripts/Networking/Net.cs.meta diff --git a/Assets/Scripts/Net/NetChaperone.cs b/Assets/Scripts/Networking/NetChaperone.cs similarity index 97% rename from Assets/Scripts/Net/NetChaperone.cs rename to Assets/Scripts/Networking/NetChaperone.cs index 079a915..8ca61de 100644 --- a/Assets/Scripts/Net/NetChaperone.cs +++ b/Assets/Scripts/Networking/NetChaperone.cs @@ -2,10 +2,10 @@ using System; using UnityEngine; using NeonTea.Quakeball.Interface; -using NeonTea.Quakeball.Net; +using NeonTea.Quakeball.Networking; using NeonTea.Quakeball.TeaNet.Peers; -namespace NeonTea.Quakeball.Net { +namespace NeonTea.Quakeball.Networking { public class NetChaperone : MonoBehaviour, PeerMessageListener { public GameObject SpawnedRemotePlayer; diff --git a/Assets/Scripts/Net/NetChaperone.cs.meta b/Assets/Scripts/Networking/NetChaperone.cs.meta similarity index 100% rename from Assets/Scripts/Net/NetChaperone.cs.meta rename to Assets/Scripts/Networking/NetChaperone.cs.meta diff --git a/Assets/Scripts/Net/NetPlayer.cs b/Assets/Scripts/Networking/NetPlayer.cs similarity index 76% rename from Assets/Scripts/Net/NetPlayer.cs rename to Assets/Scripts/Networking/NetPlayer.cs index 9b42ccd..d5a6a9a 100644 --- a/Assets/Scripts/Net/NetPlayer.cs +++ b/Assets/Scripts/Networking/NetPlayer.cs @@ -1,6 +1,7 @@ using UnityEngine; +using NeonTea.Quakeball.Player; -namespace NeonTea.Quakeball.Net { +namespace NeonTea.Quakeball.Networking { public class NetPlayer { public ulong Id; public GameObject Controlled; diff --git a/Assets/Scripts/Net/NetPlayer.cs.meta b/Assets/Scripts/Networking/NetPlayer.cs.meta similarity index 100% rename from Assets/Scripts/Net/NetPlayer.cs.meta rename to Assets/Scripts/Networking/NetPlayer.cs.meta diff --git a/Assets/Scripts/Net/Packets.meta b/Assets/Scripts/Networking/Packets.meta similarity index 100% rename from Assets/Scripts/Net/Packets.meta rename to Assets/Scripts/Networking/Packets.meta diff --git a/Assets/Scripts/Net/Packets/HelloPckt.cs b/Assets/Scripts/Networking/Packets/HelloPckt.cs similarity index 86% rename from Assets/Scripts/Net/Packets/HelloPckt.cs rename to Assets/Scripts/Networking/Packets/HelloPckt.cs index a8e6373..d40642a 100644 --- a/Assets/Scripts/Net/Packets/HelloPckt.cs +++ b/Assets/Scripts/Networking/Packets/HelloPckt.cs @@ -1,7 +1,7 @@ using NeonTea.Quakeball.TeaNet.Packets; -namespace NeonTea.Quakeball.Net.Packets { +namespace NeonTea.Quakeball.Networking.Packets { public class HelloPckt : Packet { public string Text; diff --git a/Assets/Scripts/Net/Packets/HelloPckt.cs.meta b/Assets/Scripts/Networking/Packets/HelloPckt.cs.meta similarity index 100% rename from Assets/Scripts/Net/Packets/HelloPckt.cs.meta rename to Assets/Scripts/Networking/Packets/HelloPckt.cs.meta diff --git a/Assets/Scripts/Net/Packets/PlayerUpdatePckt.cs b/Assets/Scripts/Networking/Packets/PlayerUpdatePckt.cs similarity index 73% rename from Assets/Scripts/Net/Packets/PlayerUpdatePckt.cs rename to Assets/Scripts/Networking/Packets/PlayerUpdatePckt.cs index 7d527ed..32d9b62 100644 --- a/Assets/Scripts/Net/Packets/PlayerUpdatePckt.cs +++ b/Assets/Scripts/Networking/Packets/PlayerUpdatePckt.cs @@ -1,7 +1,26 @@ using UnityEngine; using NeonTea.Quakeball.TeaNet.Packets; -namespace NeonTea.Quakeball.Net.Packets { +using System.Collections.Generic; +using NeonTea.Quakeball.Networking; + +namespace NeonTea.Quakeball.Networking.Packets { + public class MultiplePlayerUpdatesPckt : Packet { + + public List Updates = new List(); + + public MultiplePlayerUpdatesPckt() { } + + public MultiplePlayerUpdatesPckt(List players) { + } + + public override void Read(ByteBuffer buffer) { + } + + public override void Write(ByteBuffer buffer) { + } + } + public class PlayerUpdatePckt : Packet { public ulong PlayerId; diff --git a/Assets/Scripts/Net/Packets/PlayerUpdatePckt.cs.meta b/Assets/Scripts/Networking/Packets/PlayerUpdatePckt.cs.meta similarity index 100% rename from Assets/Scripts/Net/Packets/PlayerUpdatePckt.cs.meta rename to Assets/Scripts/Networking/Packets/PlayerUpdatePckt.cs.meta diff --git a/Assets/Scripts/Net/Packets/SpawnPckt.cs b/Assets/Scripts/Networking/Packets/SpawnPckt.cs similarity index 95% rename from Assets/Scripts/Net/Packets/SpawnPckt.cs rename to Assets/Scripts/Networking/Packets/SpawnPckt.cs index c1ff43b..493d9da 100644 --- a/Assets/Scripts/Net/Packets/SpawnPckt.cs +++ b/Assets/Scripts/Networking/Packets/SpawnPckt.cs @@ -1,7 +1,7 @@ using UnityEngine; using NeonTea.Quakeball.TeaNet.Packets; -namespace NeonTea.Quakeball.Net.Packets { +namespace NeonTea.Quakeball.Networking.Packets { public class SpawnPckt : Packet { public ulong PlayerId; diff --git a/Assets/Scripts/Net/Packets/SpawnPckt.cs.meta b/Assets/Scripts/Networking/Packets/SpawnPckt.cs.meta similarity index 100% rename from Assets/Scripts/Net/Packets/SpawnPckt.cs.meta rename to Assets/Scripts/Networking/Packets/SpawnPckt.cs.meta diff --git a/Assets/Scripts/Player/LocalPlayer.cs b/Assets/Scripts/Player/LocalPlayer.cs index 509b023..b3f84f5 100644 --- a/Assets/Scripts/Player/LocalPlayer.cs +++ b/Assets/Scripts/Player/LocalPlayer.cs @@ -1,7 +1,7 @@ using UnityEngine; using UnityEngine.InputSystem; -using NeonTea.Quakeball.Net; -using NeonTea.Quakeball.Net.Packets; +using NeonTea.Quakeball.Networking; +using NeonTea.Quakeball.Networking.Packets; namespace NeonTea.Quakeball.Player { /// A controller class for a local player. Handles input and updates the relevant components. @@ -82,8 +82,8 @@ namespace NeonTea.Quakeball.Player { PreviousPlayerUpdate = Time.time; WantsToJump = false; - if (Net.Net.Singleton.Instance != null) { - Net.Net.Singleton.Instance.UpdateLocalPlayer(Player.CreatePacket()); + if (Networking.Net.Singleton.Instance != null) { + Networking.Net.Singleton.Instance.UpdateLocalPlayer(Player.CreatePacket()); } } } diff --git a/Assets/Scripts/Player/Player.cs b/Assets/Scripts/Player/Player.cs index f432b1b..48d0bef 100644 --- a/Assets/Scripts/Player/Player.cs +++ b/Assets/Scripts/Player/Player.cs @@ -1,5 +1,5 @@ using UnityEngine; -using NeonTea.Quakeball.Net.Packets; +using NeonTea.Quakeball.Networking.Packets; namespace NeonTea.Quakeball.Player { /// The central glue class for players (both local and remote). diff --git a/Assets/Scripts/Player/RemotePlayer.cs b/Assets/Scripts/Player/RemotePlayer.cs index 1ebcb07..745ce7b 100644 --- a/Assets/Scripts/Player/RemotePlayer.cs +++ b/Assets/Scripts/Player/RemotePlayer.cs @@ -1,5 +1,5 @@ using UnityEngine; -using NeonTea.Quakeball.Net.Packets; +using NeonTea.Quakeball.Networking.Packets; using NeonTea.Quakeball.Interface; namespace NeonTea.Quakeball.Player {