Sync finished

Lets try
This commit is contained in:
AliIbnAbiTalib
2023-04-11 15:02:09 +02:00
parent b46b3aebe3
commit 7c4d57b2c0
4 changed files with 16 additions and 0 deletions
+8
View File
@@ -279,6 +279,9 @@ public class Client : MonoBehaviour
case 11:
playersInGameText.text = job.data[1] + "/4";
break;
case 12:
((NoPlayablePlayer)players[job.data[1]]).pinkFieldLostItem(job.data[2]);
break;
case 126:
stream.Write(new byte[]{126, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, 10);
break;
@@ -379,4 +382,9 @@ public class Client : MonoBehaviour
{
stream.Write(new byte[]{126, 0, 0, 0, 0, 0, 0, 0, 0, 0});
}
public void SendLostItem(byte index)
{
stream.Write(new byte[]{12, index, 0, 0, 0, 0, 0, 0, 0, 0});
}
}
@@ -280,4 +280,9 @@ public class NoPlayablePlayer : Player
transform.position + Vector3.up * 3, ref useLess, 0.2f);
diceScript.StartRandom();
}
public void pinkFieldLostItem(int index)
{
itemInfoImages[index].color = new Color(0, 0, 0, 0);
}
}
@@ -244,6 +244,7 @@ public class PlayablePlayer : Player
int pickRandomItem = Random.Range(0, tempCurrentItems);
client.items[pickRandomItem] = null;
itemInfoImages[pickRandomItem].color = new Color(0, 0, 0, 0);
client.SendLostItem((byte)pickRandomItem);
}
break;
}