GodotTicTacToe/scripts/Client.cs
2017-11-21 19:33:48 +02:00

24 lines
561 B
C#

using Godot;
public class Client : Peer {
private PacketPeerUDP PacketPeer;
private Connection ServerConn;
private byte[] TempBuffer = {1};
public Client(PacketPeerUDP packetPeer) : base(packetPeer) {
PacketPeer = packetPeer;
}
public override void Initialize(string address, int port) {
GD.print("Start client.");
ServerConn = new Connection(address, port);
}
public override void Update(float delta) {
GD.print("Update client.");
SendBuffer(TempBuffer, ServerConn);
}
}