bidde sehr

This commit is contained in:
AliIbnAbiTalib
2023-02-27 19:26:09 +01:00
parent 51155b4e97
commit 7a337ca15f
6 changed files with 34 additions and 22 deletions
+2
View File
@@ -11,6 +11,7 @@ using UnityEngine.SceneManagement;
public class Client : MonoBehaviour
{
[SerializeField] private TMP_Text textLeftMoves;
private TcpClient client;
private Stream stream;
[SerializeField] private GameObject playerPrefab;
@@ -191,6 +192,7 @@ public class Client : MonoBehaviour
players[job.data[1]].textCoinsInfo = playerInfoElements[job.data[1]].textCoinInfo;
players[job.data[1]].textStarsInfo = playerInfoElements[job.data[1]].textStarsInfo;
players[job.data[1]].uiHandler = uiHandler;
players[job.data[1]].textLeftMoves = textLeftMoves;
players[job.data[1]].Init();
playerNameTexts[job.data[1]].text = Encoding.ASCII.GetString(name).Replace(" ", "");
@@ -54,6 +54,7 @@ public class PlayablePlayer : Player
{
wurfelt = true;
wurfelZahl = Random.Range(1, 7);
textLeftMoves.text = wurfelZahl + "";
client.SendWurfeln(wurfelZahl);
@@ -91,6 +92,7 @@ public class PlayablePlayer : Player
else if (wurfelZahl > 0)
{
wurfelZahl--;
textLeftMoves.text = wurfelZahl + "";
//the next field is the current field XD
currentField = nextField;
+1 -1
View File
@@ -17,7 +17,7 @@ public abstract class Player : MonoBehaviour
public int index;
public int coins = 0;
public int stars = 0;
public TMP_Text textCoinsInfo, textStarsInfo;
public TMP_Text textCoinsInfo, textStarsInfo, textLeftMoves;
protected bool eventstop = false;
public UIHandler uiHandler;