Linked Rotator with Pink Field
This commit is contained in:
+4
-2
@@ -43,6 +43,8 @@
|
||||
"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"
|
||||
},
|
||||
@@ -56,7 +58,7 @@
|
||||
}]]></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" />
|
||||
<option name="EXE_PATH" value="$USER_HOME$/Desktop/Build/FlufflParty.exe" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="C:\Users\braus\OneDrive\Desktop\FlufflPartyTestBuild" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
@@ -163,7 +165,7 @@
|
||||
<workItem from="1680813239896" duration="4155000" />
|
||||
<workItem from="1681056387914" duration="882000" />
|
||||
<workItem from="1681415672515" duration="5000" />
|
||||
<workItem from="1681479671396" duration="265000" />
|
||||
<workItem from="1681479671396" duration="5656000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ GameObject:
|
||||
- component: {fileID: 7556365767940820385}
|
||||
- component: {fileID: 8043942569442897806}
|
||||
m_Layer: 0
|
||||
m_Name: ItemMushroom
|
||||
m_Name: Mushroom
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -5071,13 +5071,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 12397521}
|
||||
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 104.92, y: 3.74, z: 108.24}
|
||||
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 16.086388, y: -4.5710506, z: -9.919952}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 22
|
||||
m_Father: {fileID: 532108336}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
|
||||
--- !u!1 &24235161
|
||||
GameObject:
|
||||
@@ -5162,7 +5162,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 17
|
||||
m_RootOrder: 18
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &34779300
|
||||
GameObject:
|
||||
@@ -5441,7 +5441,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 18
|
||||
m_RootOrder: 19
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &47812148
|
||||
MonoBehaviour:
|
||||
@@ -5533,6 +5533,7 @@ MonoBehaviour:
|
||||
layoutItemShop: {fileID: 1235522788}
|
||||
layoutSelectItem: {fileID: 1370614407}
|
||||
layoutOptions: {fileID: 1903920335}
|
||||
rotator: {fileID: 132120855}
|
||||
--- !u!1 &52894754
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -6678,6 +6679,7 @@ MonoBehaviour:
|
||||
- {fileID: 479644163}
|
||||
- {fileID: 1187141365}
|
||||
- {fileID: 516946749}
|
||||
uiHandler: {fileID: 47812149}
|
||||
--- !u!1 &163128932
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -11626,13 +11628,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 167147445}
|
||||
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 104.92, y: 3.74, z: 127.64}
|
||||
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 16.086388, y: -4.5710506, z: 9.480049}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 23
|
||||
m_Father: {fileID: 532108336}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
|
||||
--- !u!1 &174015781
|
||||
GameObject:
|
||||
@@ -11784,7 +11786,7 @@ Transform:
|
||||
- {fileID: 1736008288}
|
||||
- {fileID: 1406090858}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 8
|
||||
m_RootOrder: 9
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &179390189
|
||||
GameObject:
|
||||
@@ -11892,7 +11894,7 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 1202275724}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 15
|
||||
m_RootOrder: 16
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!43 &191235143
|
||||
Mesh:
|
||||
@@ -12897,7 +12899,7 @@ Transform:
|
||||
- {fileID: 52894757}
|
||||
- {fileID: 314972567}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 12
|
||||
m_RootOrder: 13
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &250767830
|
||||
GameObject:
|
||||
@@ -13962,7 +13964,7 @@ RectTransform:
|
||||
- {fileID: 1903920336}
|
||||
- {fileID: 132120856}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 13
|
||||
m_RootOrder: 14
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@@ -19474,13 +19476,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 434658651}
|
||||
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 104.92, y: 3.74, z: 89.42}
|
||||
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 16.086388, y: -4.5710506, z: -28.739952}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 24
|
||||
m_Father: {fileID: 532108336}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
|
||||
--- !u!1001 &437347124
|
||||
PrefabInstance:
|
||||
@@ -21005,6 +21007,43 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 531419859}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &532108335
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 532108336}
|
||||
m_Layer: 0
|
||||
m_Name: Particles
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &532108336
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 532108335}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 88.83361, y: 8.31105, z: 118.15995}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1964684155}
|
||||
- {fileID: 1229194791}
|
||||
- {fileID: 1691493601}
|
||||
- {fileID: 12397524}
|
||||
- {fileID: 167147448}
|
||||
- {fileID: 434658654}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &582840967
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -22309,7 +22348,7 @@ Transform:
|
||||
- {fileID: 1017709783}
|
||||
- {fileID: 2106570837}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 14
|
||||
m_RootOrder: 15
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &675727855
|
||||
MonoBehaviour:
|
||||
@@ -23303,7 +23342,7 @@ Transform:
|
||||
- {fileID: 431546227}
|
||||
- {fileID: 1740517987}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 16
|
||||
m_RootOrder: 17
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &782948711
|
||||
GameObject:
|
||||
@@ -26537,7 +26576,7 @@ Transform:
|
||||
- {fileID: 657595552}
|
||||
- {fileID: 253183257}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 7
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1108023622
|
||||
GameObject:
|
||||
@@ -32757,13 +32796,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1229194788}
|
||||
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 87.63, y: 3.74, z: 127.64}
|
||||
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -1.2036133, y: -4.5710506, z: 9.480049}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 20
|
||||
m_Father: {fileID: 532108336}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
|
||||
--- !u!1 &1235522788
|
||||
GameObject:
|
||||
@@ -33871,7 +33910,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 10
|
||||
m_RootOrder: 11
|
||||
m_LocalEulerAnglesHint: {x: 50.61, y: 151.873, z: 2.915}
|
||||
--- !u!114 &1328561028
|
||||
MonoBehaviour:
|
||||
@@ -35523,7 +35562,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1547369677
|
||||
GameObject:
|
||||
@@ -35701,7 +35740,7 @@ Transform:
|
||||
- {fileID: 203184820}
|
||||
- {fileID: 1357405425}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 9
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1585901470
|
||||
PrefabInstance:
|
||||
@@ -42729,13 +42768,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1691493598}
|
||||
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 87.63, y: 3.74, z: 89.42}
|
||||
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -1.2036133, y: -4.5710506, z: -28.739952}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 21
|
||||
m_Father: {fileID: 532108336}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
|
||||
--- !u!1001 &1704529805
|
||||
PrefabInstance:
|
||||
@@ -43871,7 +43910,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 11
|
||||
m_RootOrder: 12
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1805722634
|
||||
GameObject:
|
||||
@@ -50236,13 +50275,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1964684152}
|
||||
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 87.63, y: 3.74, z: 108.24}
|
||||
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -1.2036133, y: -4.5710506, z: -9.919952}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 19
|
||||
m_Father: {fileID: 532108336}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
|
||||
--- !u!1 &1965297689
|
||||
GameObject:
|
||||
|
||||
@@ -282,6 +282,14 @@ public class Client : MonoBehaviour
|
||||
case 12:
|
||||
((NoPlayablePlayer)players[job.data[1]]).pinkFieldLostItem(job.data[2]);
|
||||
break;
|
||||
case 13:
|
||||
int amount = job.data[2];
|
||||
if (job.data[1] == 0)
|
||||
{
|
||||
amount *= -1;
|
||||
}
|
||||
players[job.data[3]].AddCoins(amount);
|
||||
break;
|
||||
case 126:
|
||||
stream.Write(new byte[]{126, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, 10);
|
||||
break;
|
||||
@@ -387,4 +395,16 @@ public class Client : MonoBehaviour
|
||||
{
|
||||
stream.Write(new byte[]{12, index, 0, 0, 0, 0, 0, 0, 0, 0});
|
||||
}
|
||||
|
||||
public void SendCoins(int amount)
|
||||
{
|
||||
byte isPositive = 1;
|
||||
if (amount < 0)
|
||||
{
|
||||
isPositive = 0;
|
||||
}
|
||||
|
||||
|
||||
stream.Write(new byte[]{13, isPositive, (byte)amount, 0, 0, 0, 0, 0, 0, 0});
|
||||
}
|
||||
}
|
||||
@@ -190,6 +190,7 @@ public class NoPlayablePlayer : Player
|
||||
currentRotation.y = -34;
|
||||
transform.rotation = Quaternion.Euler(currentRotation);
|
||||
|
||||
|
||||
if (!wurfelt)
|
||||
{
|
||||
StartDice();
|
||||
|
||||
@@ -19,6 +19,8 @@ public class PlayablePlayer : Player
|
||||
private float interPol = 0;
|
||||
private int wurfelZahl = 0;
|
||||
private bool checkDoubleDice = false;
|
||||
private RandomRotator rotator;
|
||||
private int rotatorStopIndex = 0;
|
||||
|
||||
private bool wait = false;
|
||||
|
||||
@@ -49,10 +51,6 @@ public class PlayablePlayer : Player
|
||||
diceScript = dice.GetComponent<Dice>();
|
||||
|
||||
instance = this;
|
||||
|
||||
AddItem(client.items[1]);
|
||||
AddItem(client.items[0]);
|
||||
AddItem(client.items[2]);
|
||||
}
|
||||
|
||||
public static PlayablePlayer GetCurrentInstance()
|
||||
@@ -112,7 +110,7 @@ public class PlayablePlayer : Player
|
||||
jumpRequest = true;
|
||||
|
||||
wurfelt = true;
|
||||
wurfelZahl = Random.Range(1, 7);
|
||||
wurfelZahl = Random.Range(4, 5);
|
||||
|
||||
switch (activeItem)
|
||||
{
|
||||
@@ -198,10 +196,15 @@ public class PlayablePlayer : Player
|
||||
currentRotation.y = -34;
|
||||
transform.rotation = Quaternion.Euler(currentRotation);
|
||||
|
||||
int fieldReturnStatus = -1;
|
||||
if (currentField != null)
|
||||
{
|
||||
fieldReturnStatus = currentField.Action(index);
|
||||
}
|
||||
|
||||
//TODO: temp spieler finsihed erst, wenn field action ausgeführt wurde
|
||||
if (wurfelt)
|
||||
{
|
||||
int fieldReturnStatus = currentField.Action(index);
|
||||
|
||||
switch (fieldReturnStatus)
|
||||
{
|
||||
@@ -213,49 +216,96 @@ public class PlayablePlayer : Player
|
||||
client.SendCoinFieldAction(1);
|
||||
AddCoins(-3);
|
||||
break;
|
||||
case 2: //pinkes Feld
|
||||
int randyPinkField = Random.Range(4, 4);
|
||||
int tempCurrentItems = -1;
|
||||
switch (randyPinkField)
|
||||
// case 2: //pinkes Feld
|
||||
// int randyPinkField = Random.Range(4, 4);
|
||||
// int tempCurrentItems = -1;
|
||||
// switch (randyPinkField)
|
||||
// {
|
||||
// case 1:
|
||||
// client.SendCoinFieldAction(0);
|
||||
// int tempAddCoins = Random.Range(3, 6);
|
||||
// AddCoins(tempAddCoins);
|
||||
// break;
|
||||
// case 2:
|
||||
// client.SendCoinFieldAction(1);
|
||||
// int tempLoseCoins = Random.Range(-3, -6);
|
||||
// AddCoins(tempLoseCoins);
|
||||
// break;
|
||||
// case 3:
|
||||
// int tempAddItem = Random.Range(0, 3);
|
||||
// AddItem(client.items[tempAddItem]);
|
||||
// break;
|
||||
// case 4:
|
||||
// for (int i = 0; i < items.Length; i++)
|
||||
// {
|
||||
// if (items[i] != null)
|
||||
// {
|
||||
// tempCurrentItems++;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (tempCurrentItems >= 0)
|
||||
// {
|
||||
// int pickRandomItem = Random.Range(0, tempCurrentItems);
|
||||
// client.items[pickRandomItem] = null;
|
||||
// itemInfoImages[pickRandomItem].color = new Color(0, 0, 0, 0);
|
||||
// client.SendLostItem((byte)pickRandomItem);
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// break;
|
||||
case 2:
|
||||
|
||||
|
||||
int randCoins1 = Random.Range(2, 12);
|
||||
int randCoins2 = Random.Range(5, 10);
|
||||
int randCoins3 = Random.Range(-6, 0);
|
||||
|
||||
RandomRotator rotator = uiHandler.rotator.GetComponent<RandomRotator>();
|
||||
this.rotator = rotator;
|
||||
uiHandler.ActivateRotator();
|
||||
rotator.SetOptionsText(0, randCoins1 + " Coins");
|
||||
rotator.SetOptionsText(1, randCoins2 + " Coins");
|
||||
rotator.SetOptionsText(2, randCoins3 + " Coins");
|
||||
rotator.SetOptionsText(3, "Random Item");
|
||||
|
||||
rotator.StartRandom();
|
||||
|
||||
int randomOption = Random.Range(0, 4);
|
||||
switch (randomOption)
|
||||
{
|
||||
case 0:
|
||||
AddCoins(randCoins1);
|
||||
client.SendCoins(randCoins1);
|
||||
break;
|
||||
case 1:
|
||||
client.SendCoinFieldAction(0);
|
||||
int tempAddCoins = Random.Range(3, 6);
|
||||
AddCoins(tempAddCoins);
|
||||
AddCoins(randCoins2);
|
||||
client.SendCoins(randCoins2);
|
||||
break;
|
||||
case 2:
|
||||
client.SendCoinFieldAction(1);
|
||||
int tempLoseCoins = Random.Range(-3, -6);
|
||||
AddCoins(tempLoseCoins);
|
||||
AddCoins(randCoins3);
|
||||
client.SendCoins(randCoins3);
|
||||
break;
|
||||
case 3:
|
||||
int tempAddItem = Random.Range(0, 2);
|
||||
AddItem(client.items[tempAddItem]);
|
||||
break;
|
||||
case 4:
|
||||
for (int i = 0; i < items.Length; i++)
|
||||
{
|
||||
if (items[i] != null)
|
||||
{
|
||||
tempCurrentItems++;
|
||||
}
|
||||
}
|
||||
|
||||
if (tempCurrentItems >= 0)
|
||||
{
|
||||
int pickRandomItem = Random.Range(0, tempCurrentItems);
|
||||
client.items[pickRandomItem] = null;
|
||||
itemInfoImages[pickRandomItem].color = new Color(0, 0, 0, 0);
|
||||
client.SendLostItem((byte)pickRandomItem);
|
||||
}
|
||||
int randomItem = Random.Range(0, 3);
|
||||
AddItem(client.items[randomItem]);
|
||||
break;
|
||||
}
|
||||
|
||||
rotatorStopIndex = randomOption;
|
||||
Invoke("StopRotator", 4);
|
||||
Invoke("ActivateLayout1", 7.5f);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (!checkDoubleDice)
|
||||
{
|
||||
Invoke("Finish", 2);
|
||||
if(fieldReturnStatus != 2)
|
||||
{
|
||||
Invoke("Finish", 2);
|
||||
}
|
||||
|
||||
activated = false;
|
||||
}
|
||||
else
|
||||
@@ -430,4 +480,15 @@ public class PlayablePlayer : Player
|
||||
}
|
||||
items[index] = null;
|
||||
}
|
||||
|
||||
private void ActivateLayout1()
|
||||
{
|
||||
uiHandler.ActivateLayout1();
|
||||
Finish();
|
||||
}
|
||||
|
||||
private void StopRotator()
|
||||
{
|
||||
rotator.Stop(rotatorStopIndex);
|
||||
}
|
||||
}
|
||||
@@ -13,17 +13,13 @@ public class RandomRotator : MonoBehaviour
|
||||
private int currentIndex = 0;
|
||||
private float lastTimeSwitched = 0;
|
||||
private int stopIndex = 0;
|
||||
public UIHandler uiHandler;
|
||||
|
||||
public void SetOptionsText(int index, string text)
|
||||
{
|
||||
textOptions[index].text = text;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
StartRandom();
|
||||
}
|
||||
|
||||
private void ColorOption(int index)
|
||||
{
|
||||
for (int i = 0; i < options.Length; i++)
|
||||
@@ -39,16 +35,17 @@ public class RandomRotator : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
private float slowDown = 0.5f;
|
||||
private void Update()
|
||||
{
|
||||
if (started)
|
||||
{
|
||||
if (Time.time - lastTimeSwitched > 0.1f)
|
||||
if (Time.time - lastTimeSwitched > 0.2f)
|
||||
{
|
||||
lastTimeSwitched = Time.time;
|
||||
ColorOption(currentIndex);
|
||||
currentIndex++;
|
||||
if (currentIndex > options.Length - 1)
|
||||
if (currentIndex > options.Length)
|
||||
{
|
||||
currentIndex = 0;
|
||||
}
|
||||
@@ -56,7 +53,24 @@ public class RandomRotator : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
ColorOption(stopIndex);
|
||||
if (currentIndex != stopIndex)
|
||||
{
|
||||
if (Time.time - lastTimeSwitched > slowDown)
|
||||
{
|
||||
slowDown += 0.2f;
|
||||
lastTimeSwitched = Time.time;
|
||||
ColorOption(currentIndex);
|
||||
currentIndex++;
|
||||
if (currentIndex > options.Length)
|
||||
{
|
||||
currentIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ColorOption(stopIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ public class UIHandler : MonoBehaviour
|
||||
[SerializeField] private GameObject layoutItemShop;
|
||||
[SerializeField] private GameObject layoutSelectItem;
|
||||
[SerializeField] private GameObject layoutOptions;
|
||||
[SerializeField] public GameObject rotator;
|
||||
|
||||
private static UIHandler currentInstance;
|
||||
|
||||
@@ -45,6 +46,7 @@ public class UIHandler : MonoBehaviour
|
||||
layoutItemShop.SetActive(false);
|
||||
layoutSelectItem.SetActive(false);
|
||||
layoutOptions.SetActive(false);
|
||||
rotator.SetActive(false);
|
||||
|
||||
currentInstance = this;
|
||||
}
|
||||
@@ -59,6 +61,7 @@ public class UIHandler : MonoBehaviour
|
||||
layoutItemShop.SetActive(false);
|
||||
layoutSelectItem.SetActive(false);
|
||||
layoutOptions.SetActive(false);
|
||||
rotator.SetActive(false);
|
||||
}
|
||||
|
||||
public void ActivateLayoutMiniMap()
|
||||
@@ -83,6 +86,7 @@ public class UIHandler : MonoBehaviour
|
||||
layoutItemShop.SetActive(false);
|
||||
layoutSelectItem.SetActive(false);
|
||||
layoutOptions.SetActive(false);
|
||||
rotator.SetActive(false);
|
||||
|
||||
LayoutBuyStarController controller = layoutBuyStar.GetComponent<LayoutBuyStarController>();
|
||||
|
||||
@@ -110,6 +114,7 @@ public class UIHandler : MonoBehaviour
|
||||
layoutItemShop.SetActive(false);
|
||||
layoutSelectItem.SetActive(false);
|
||||
layoutOptions.SetActive(false);
|
||||
rotator.SetActive(false);
|
||||
}
|
||||
|
||||
public void ActivateLayoutItemShop()
|
||||
@@ -123,6 +128,7 @@ public class UIHandler : MonoBehaviour
|
||||
layoutItemShop.GetComponent<ItemShop>().Init(currentPlayer);
|
||||
layoutSelectItem.SetActive(false);
|
||||
layoutOptions.SetActive(false);
|
||||
rotator.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -140,6 +146,7 @@ public class UIHandler : MonoBehaviour
|
||||
layout2.SetActive(false);
|
||||
layoutItemShop.SetActive(false);
|
||||
layoutOptions.SetActive(false);
|
||||
rotator.SetActive(false);
|
||||
|
||||
layoutSelectItem.GetComponent<ItemSelector>().Init(currentPlayer.items);
|
||||
|
||||
@@ -157,6 +164,21 @@ public class UIHandler : MonoBehaviour
|
||||
layoutItemShop.SetActive(false);
|
||||
layoutSelectItem.SetActive(false);
|
||||
layoutOptions.SetActive(true);
|
||||
rotator.SetActive(false);
|
||||
}
|
||||
|
||||
public void ActivateRotator()
|
||||
{
|
||||
rotator.GetComponent<RandomRotator>().uiHandler = this;
|
||||
layout0.SetActive(false);
|
||||
layout1.SetActive(false);
|
||||
layoutMiniMap.SetActive(false);
|
||||
layoutBuyStar.SetActive(false);
|
||||
layout2.SetActive(false);
|
||||
layoutItemShop.SetActive(false);
|
||||
layoutSelectItem.SetActive(false);
|
||||
layoutOptions.SetActive(false);
|
||||
rotator.SetActive(true);
|
||||
}
|
||||
|
||||
public void ButtonBuyStar()
|
||||
|
||||
@@ -137,7 +137,9 @@ PlayerSettings:
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 0.14
|
||||
preloadedAssets: []
|
||||
preloadedAssets:
|
||||
- {fileID: -6230802382160794249, guid: 90cd1b71078984c4980fcd1aa03eaaa3, type: 2}
|
||||
- {fileID: 11400000, guid: 48bf7376b3770c44cbfe3f40e77359ab, type: 2}
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
m_HolographicPauseOnTrackingLoss: 1
|
||||
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
Generated
+17
-18
@@ -9,9 +9,7 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="6d89163f-4054-4765-8ee3-ac6da16b6997" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/out/artifacts/Server_jar/Server.jar" beforeDir="false" afterPath="$PROJECT_DIR$/out/artifacts/Server_jar/Server.jar" afterDir="false" />
|
||||
</list>
|
||||
<list default="true" id="6d89163f-4054-4765-8ee3-ac6da16b6997" name="Changes" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
@@ -35,22 +33,22 @@
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"last_opened_file_path": "/media/jonas/Data/Unity/flufflparty/Server",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"project.structure.last.edited": "Artifacts",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"last_opened_file_path": "D:/Unity/flufflparty/Server",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"project.structure.last.edited": "Artifacts",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}</component>
|
||||
}]]></component>
|
||||
<component name="RunManager">
|
||||
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="Main" />
|
||||
@@ -103,6 +101,7 @@
|
||||
<workItem from="1681130452664" duration="6192000" />
|
||||
<workItem from="1681217780586" duration="94000" />
|
||||
<workItem from="1681218296017" duration="162000" />
|
||||
<workItem from="1681481242206" duration="1671000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -257,6 +257,16 @@ public class Room
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
for (int i = 0; i < players.length; i++)
|
||||
{
|
||||
//Sync to OTHER players
|
||||
if (i != player)
|
||||
{
|
||||
players[i].output.write(new byte[]{13, readData[1], readData[2], (byte)player, 0, 0, 0, 0, 0, 0});
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 126:
|
||||
server.deleteRoom(roomCode);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user