Unlucky Field

This commit is contained in:
AlexE030
2023-04-23 01:06:37 +02:00
parent 89c88b4e04
commit 4807ecdd76
3 changed files with 70 additions and 18 deletions
+21 -17
View File
@@ -4,7 +4,11 @@
<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/Client.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Client.cs" 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 +44,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"><![CDATA[{ <component name="PropertiesComponent">{
"keyToString": { &quot;keyToString&quot;: {
"Discover.Launch.Via.Unity": "true", &quot;Discover.Launch.Via.Unity&quot;: &quot;true&quot;,
"RunOnceActivity.OpenProjectViewOnStart": "true", &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"WebServerToolWindowFactoryState": "false", &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
"node.js.detected.package.eslint": "true", &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
"node.js.selected.package.eslint": "(autodetect)", &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
"node.js.selected.package.tslint": "(autodetect)", &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
"vue.rearranger.settings.migration": "true" &quot;vue.rearranger.settings.migration&quot;: &quot;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\\braus\\AppData\\Roaming\\JetBrains\\Rider2023.1\\resharper-host\\DecompilerCache&quot;,
"C:\\Users\\braus\\AppData\\Roaming\\JetBrains\\Rider2023.1\\resharper-host\\SourcesCache", &quot;C:\\Users\\braus\\AppData\\Roaming\\JetBrains\\Rider2023.1\\resharper-host\\SourcesCache&quot;,
"C:\\Users\\braus\\AppData\\Local\\Symbols\\src" &quot;C:\\Users\\braus\\AppData\\Local\\Symbols\\src&quot;
] ]
} }
}]]></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" />
+5
View File
@@ -574,6 +574,11 @@ public class Client : MonoBehaviour
stream.Write(new byte[] { 13, isPositive, (byte)amount, 0, 0, 0, 0, 0, 0, 0 }); stream.Write(new byte[] { 13, isPositive, (byte)amount, 0, 0, 0, 0, 0, 0, 0 });
} }
public void SendLostStar()
{
//TODO: stream.Write implementieren
}
/* /*
* TYPE: * TYPE:
* 0 = Pink Field!!!! * 0 = Pink Field!!!!
@@ -218,7 +218,7 @@ public class PlayablePlayer : Player
client.SendCoinFieldAction(1); client.SendCoinFieldAction(1);
AddCoins(-3); AddCoins(-3);
break; break;
case 2: case 2: //LuckField
int randCoins1 = Random.Range(2, 6); int randCoins1 = Random.Range(2, 6);
int randCoins2 = Random.Range(1, 4); int randCoins2 = Random.Range(1, 4);
int randCoins3 = Random.Range(-6, 0); int randCoins3 = Random.Range(-6, 0);
@@ -284,6 +284,49 @@ public class PlayablePlayer : Player
Invoke("StopRotator", 2); Invoke("StopRotator", 2);
Invoke("ActivateLayout1", 5.5f); Invoke("ActivateLayout1", 5.5f);
break; break;
/*case 4: //UnluckyField
int looseRandCoins1 = Random.Range(-6, -2);
int looseRandCoins2 = Random.Range(-4, -1);
int looseRandCoins3 = Random.Range(-6, 0);
RandomRotator rotatorUnluckyField = uiHandler.rotator.GetComponent<RandomRotator>();
this.rotator = rotatorUnluckyField;
uiHandler.ActivateRotator();
rotatorUnluckyField.SetOptionsText(0, "Loose" + looseRandCoins1 + " Coins");
rotatorUnluckyField.SetOptionsText(1, "Loose" + looseRandCoins2 + " Coins");
rotatorUnluckyField.SetOptionsText(2, "Loose" + looseRandCoins3 + " Coins");
rotatorUnluckyField.SetOptionsText(3, "Loose a star");
rotatorUnluckyField.SetHint(0);
rotatorUnluckyField.StartRandom();
client.SendStartRotator(0, 0, 1, 2, looseRandCoins1, looseRandCoins2, looseRandCoins3, 0, 0); //TODO: Überprüfen, keine Ahnung ob das stimmt :D
int randomOptionUnluckyField = Random.Range(0, 4);
switch (randomOptionUnluckyField)
{
case 0:
AddCoins(looseRandCoins1);
client.SendCoins(looseRandCoins1);
break;
case 1:
AddCoins(looseRandCoins2);
client.SendCoins(looseRandCoins2);
break;
case 2:
AddCoins(looseRandCoins3);
client.SendCoins(looseRandCoins3);
break;
case 3:
AddStars(-1);
client.SendLostStar();
break;
}
rotatorStopIndex = randomOptionUnluckyField;
Invoke("StopRotator", 2);
Invoke("ActivateLayout1", 5.5f);
break;*/
} }
if (!checkDoubleDice) if (!checkDoubleDice)