Nach jeder Runde (jeder spieler hat einmal gewürfelt) wird ein zufälliges minigame geladen. Ist das minigame beendet (stand jz nach 1 sekunde fix) wird die Map in Ihrem vorherigen zustand neu geladen. Die Kommunikation zwischen Client und Server im Minigame erfolgt unabhängig der Kommunikation in der Map
21 lines
417 B
C#
21 lines
417 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Net.Sockets;
|
|
using UnityEngine;
|
|
|
|
public class Testt : MonoBehaviour
|
|
{
|
|
private TcpClient client;
|
|
|
|
private void Start()
|
|
{
|
|
client = new TcpClient("185.245.96.48", 8051);
|
|
|
|
Stream stream = client.GetStream();
|
|
|
|
stream.Write(new byte[]{5, 0, 0, 0, 0, 0, 0, 0, 0, 0});
|
|
}
|
|
}
|