Item Field Case

Item Field Funktion mit Rotator geschrieben, Befehl fürs senden an den Client wurde ausgegraut und muss nochmal angeschaut werden
Funktion wurde noch NICHT getestet.
This commit is contained in:
AliIbnAbiTalib committed 2023-04-16 15:11:52 +02:00
1 parent 54c40d7cf4
commit db5f7a5081
2 files changed
+41 -17

No files matched your search

+21 -17
View File
@@ -4,7 +4,10 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="f0abe486-ee58-49bd-ad63-04a8b3fc78ec" name="Changes" comment="" /> <list default="true" id="f0abe486-ee58-49bd-ad63-04a8b3fc78ec" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.FlufflParty/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.FlufflParty/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Players/PlayablePlayer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Players/PlayablePlayer.cs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -40,25 +43,25 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;Discover.Launch.Via.Unity&quot;: &quot;true&quot;, "Discover.Launch.Via.Unity": "true",
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "RunOnceActivity.OpenProjectViewOnStart": "true",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;, "WebServerToolWindowFactoryState": "false",
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, "node.js.detected.package.eslint": "true",
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.eslint": "(autodetect)",
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.tslint": "(autodetect)",
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; "vue.rearranger.settings.migration": "true"
}, },
&quot;keyToStringList&quot;: { "keyToStringList": {
&quot;rider.external.source.directories&quot;: [ "rider.external.source.directories": [
&quot;C:\\Users\\braus\\AppData\\Roaming\\JetBrains\\Rider2023.1\\resharper-host\\DecompilerCache&quot;, "C:\\Users\\afist\\AppData\\Roaming\\JetBrains\\Rider2022.3\\resharper-host\\DecompilerCache",
&quot;C:\\Users\\braus\\AppData\\Roaming\\JetBrains\\Rider2023.1\\resharper-host\\SourcesCache&quot;, "C:\\Users\\afist\\AppData\\Roaming\\JetBrains\\Rider2022.3\\resharper-host\\SourcesCache",
&quot;C:\\Users\\braus\\AppData\\Local\\Symbols\\src&quot; "C:\\Users\\afist\\AppData\\Local\\Symbols\\src"
] ]
} }
}</component> }]]></component>
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor"> <component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
<configuration name="Standalone Player" type="RunUnityExe" factoryName="Unity Executable"> <configuration name="Standalone Player" type="RunUnityExe" factoryName="Unity Executable">
<option name="EXE_PATH" value="$USER_HOME$/Desktop/Build/FlufflParty.exe" /> <option name="EXE_PATH" value="$USER_HOME$/Desktop/Build/FlufflParty.exe" />
@@ -170,6 +173,7 @@
<workItem from="1681415672515" duration="5000" /> <workItem from="1681415672515" duration="5000" />
<workItem from="1681479671396" duration="22217000" /> <workItem from="1681479671396" duration="22217000" />
<workItem from="1681565663292" duration="642000" /> <workItem from="1681565663292" duration="642000" />
<workItem from="1681648997302" duration="1618000" />
</task> </task>
<servers /> <servers />
</component> </component>
@@ -4,6 +4,8 @@ using System.Collections.Generic;
using System.Net.Mail; using System.Net.Mail;
using TMPro; using TMPro;
using Unity.VisualScripting; using Unity.VisualScripting;
using UnityEditor;
using UnityEditor.Timeline.Actions;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using Random = UnityEngine.Random; using Random = UnityEngine.Random;
@@ -303,6 +305,24 @@ public class PlayablePlayer : Player
Invoke("StopRotator", 2); Invoke("StopRotator", 2);
Invoke("ActivateLayout1", 5.5f); Invoke("ActivateLayout1", 5.5f);
break; break;
case 3: //Item Field keine Ahnung ob das funktioniert XD muss man mal testen; Keine Ahnung was SendStartRotator an den Server weitersendet MUSS überarbeitet werden
RandomRotator rotatorItemField = uiHandler.rotator.GetComponent<RandomRotator>();
this.rotator = rotatorItemField;
uiHandler.ActivateRotator();
rotatorItemField.SetOptionsText(0, "Mushroom");
rotatorItemField.SetOptionsText(1, "Double Dice");
rotatorItemField.SetOptionsText(2, "Trap");
rotatorItemField.StartRandom();
//???client.SendStartRotator(0, 1, 2, randCoins1, randCoins2, -randCoins3, 0, 0);
int randomItemField = Random.Range(0, 3);
AddItem(client.items[randomItemField]);
rotatorStopIndex = randomItemField;
Invoke("StopRotator", 2);
Invoke("ActivateLayout1", 5.5f);
break;
} }
if (!checkDoubleDice) if (!checkDoubleDice)