GodotTicTacToe/scripts/Client.cs

24 lines
561 B
C#
Raw Normal View History

2017-11-21 18:33:48 +01:00
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);
}
}