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
2023-04-16 15:11:52 +02:00
parent 54c40d7cf4
commit db5f7a5081
2 changed files with 41 additions and 17 deletions
+21 -17
View File
@@ -4,7 +4,10 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<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="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -40,25 +43,25 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<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;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"Discover.Launch.Via.Unity": "true",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"WebServerToolWindowFactoryState": "false",
"node.js.detected.package.eslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"vue.rearranger.settings.migration": "true"
},
&quot;keyToStringList&quot;: {
&quot;rider.external.source.directories&quot;: [
&quot;C:\\Users\\braus\\AppData\\Roaming\\JetBrains\\Rider2023.1\\resharper-host\\DecompilerCache&quot;,
&quot;C:\\Users\\braus\\AppData\\Roaming\\JetBrains\\Rider2023.1\\resharper-host\\SourcesCache&quot;,
&quot;C:\\Users\\braus\\AppData\\Local\\Symbols\\src&quot;
"keyToStringList": {
"rider.external.source.directories": [
"C:\\Users\\afist\\AppData\\Roaming\\JetBrains\\Rider2022.3\\resharper-host\\DecompilerCache",
"C:\\Users\\afist\\AppData\\Roaming\\JetBrains\\Rider2022.3\\resharper-host\\SourcesCache",
"C:\\Users\\afist\\AppData\\Local\\Symbols\\src"
]
}
}</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$/Desktop/Build/FlufflParty.exe" />
@@ -170,6 +173,7 @@
<workItem from="1681415672515" duration="5000" />
<workItem from="1681479671396" duration="22217000" />
<workItem from="1681565663292" duration="642000" />
<workItem from="1681648997302" duration="1618000" />
</task>
<servers />
</component>
@@ -4,6 +4,8 @@ using System.Collections.Generic;
using System.Net.Mail;
using TMPro;
using Unity.VisualScripting;
using UnityEditor;
using UnityEditor.Timeline.Actions;
using UnityEngine;
using UnityEngine.UI;
using Random = UnityEngine.Random;
@@ -303,6 +305,24 @@ public class PlayablePlayer : Player
Invoke("StopRotator", 2);
Invoke("ActivateLayout1", 5.5f);
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)