This commit is contained in:
brausjonas
2023-02-15 21:15:42 +01:00
parent d8fcd821be
commit f69f05d6dd
2 changed files with 32 additions and 32 deletions
+21 -20
View File
@@ -1,16 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="f0abe486-ee58-49bd-ad63-04a8b3fc78ec" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Players/PlayablePlayer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Players/PlayablePlayer.cs" afterDir="false" />
</list>
<list default="true" id="f0abe486-ee58-49bd-ad63-04a8b3fc78ec" name="Changes" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="HighlightingSettingsPerFile">
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Client.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Client.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Fields/EventField.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Fields/Field.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Fields/GetCoinsField.cs" root0="FORCE_HIGHLIGHTING" />
@@ -19,9 +17,9 @@
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Fields/LuckField.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Fields/UnluckyField.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Fields/VSField.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Players/AnimationHandler.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Players/NoPlayablePlayer.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Players/PlayablePlayer.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Players/AnimationHandler.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Players/NoPlayablePlayer.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Players/PlayablePlayer.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Players/Player.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Players/PlayerInfoElements.cs" root0="FORCE_HIGHLIGHTING" />
</component>
@@ -33,22 +31,22 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"Discover.Launch.Via.Unity": "true",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"WebServerToolWindowFactoryState": "false",
"vue.rearranger.settings.migration": "true"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;Discover.Launch.Via.Unity&quot;: &quot;true&quot;,
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
},
"keyToStringList": {
"rider.external.source.directories": [
"C:\\Users\\aer\\AppData\\Roaming\\JetBrains\\Rider2022.3\\resharper-host\\DecompilerCache",
"C:\\Users\\aer\\AppData\\Roaming\\JetBrains\\Rider2022.3\\resharper-host\\SourcesCache",
"C:\\Users\\aer\\AppData\\Local\\Symbols\\src"
&quot;keyToStringList&quot;: {
&quot;rider.external.source.directories&quot;: [
&quot;C:\\Users\\braus\\AppData\\Roaming\\JetBrains\\Rider2022.3\\resharper-host\\DecompilerCache&quot;,
&quot;C:\\Users\\braus\\AppData\\Roaming\\JetBrains\\Rider2022.3\\resharper-host\\SourcesCache&quot;,
&quot;C:\\Users\\braus\\AppData\\Local\\Symbols\\src&quot;
]
}
}]]></component>
}</component>
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
<configuration name="Standalone Player" type="RunUnityExe" factoryName="Unity Executable">
<option name="EXE_PATH" value="$USER_HOME$/OneDrive/Desktop/FlufflPartyBuild/FlufflParty.exe" />
@@ -123,6 +121,9 @@
<workItem from="1675598313139" duration="8968000" />
<workItem from="1675795702707" duration="512000" />
<workItem from="1675797317461" duration="3244000" />
<workItem from="1675880708738" duration="89000" />
<workItem from="1675880834012" duration="36000" />
<workItem from="1675880900142" duration="5000" />
</task>
<servers />
</component>
+11 -12
View File
@@ -28,15 +28,14 @@ public class Client : MonoBehaviour
private void Start()
{
for (int i = 0; i < 4; i++)
{
playerInfo[i].SetActive(false);
}
client = new TcpClient("185.245.96.48", 8051);
stream = client.GetStream();
stream.Write(new byte[] { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 10);
@@ -49,7 +48,7 @@ public class Client : MonoBehaviour
{
playerInfoElements[i] = playerInfo[i].GetComponent<PlayerInfoElements>();
}
new Thread(Read).Start();
}
@@ -67,7 +66,7 @@ public class Client : MonoBehaviour
if (job.data[1] == 1)
{
GameObject player = Instantiate(playerPrefab);
player.transform.position = new Vector3(job.data[2], job.data[3] + 0.5f, job.data[4]);
PlayablePlayer script = player.AddComponent<PlayablePlayer>();
@@ -118,13 +117,13 @@ public class Client : MonoBehaviour
players[job.data[1]].Init();
playerNameTexts[job.data[1]].text = Encoding.ASCII.GetString(name).Replace(" ", "");
uiHandler.ActivateLayout1();
playerInfo[job.data[1]].SetActive(true);
break;
case 6:
((NoPlayablePlayer)players[job.data[1]]).CoinFieldAction(job.data[2]);
break;
@@ -169,7 +168,7 @@ public class Client : MonoBehaviour
while (true)
{
byte[] read = new byte[10];
stream.Read(read, 0, 10);
jobs.Enqueue(new Job(read));
@@ -180,10 +179,10 @@ public class Client : MonoBehaviour
//1 x, x = zahl
public void SendWurfeln(int zahl)
{
stream.Write(new byte[]{3, (byte)zahl, 0, 0, 0, 0, 0, 0, 0, 0});
}
//0 4 arrow selected
//1 x, x = arrow idx
public void SendArrowSelected(int idx)