PlacementBugFixed
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<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/NoPlayablePlayer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Players/NoPlayablePlayer.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Packages/packages-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/packages-lock.json" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
||||
@@ -3632,7 +3632,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &584878063
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3668,7 +3668,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 0.92941177, b: 0.78039217, a: 0.84313726}
|
||||
m_Color: {r: 0.5566038, g: 0.50850105, b: 0.4069509, a: 0.84313726}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
|
||||
@@ -68,10 +68,12 @@ public class Client : MonoBehaviour
|
||||
public void CalculatePlacement()
|
||||
{
|
||||
Player[] temp = new Player[playerAmount];
|
||||
bool[] samePlacement = new bool[playerAmount];
|
||||
|
||||
for (int j = 0; j < temp.Length; j++)
|
||||
{
|
||||
temp[j] = players[j];
|
||||
samePlacement[j] = false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < temp.Length - 1; i++)
|
||||
@@ -86,16 +88,27 @@ public class Client : MonoBehaviour
|
||||
{
|
||||
(temp[f], temp[f + 1]) = (temp[f + 1], temp[f]);
|
||||
}
|
||||
else if(temp[f].stars == temp[f + 1].stars && temp[f].coins == temp[f + 1].coins)
|
||||
{
|
||||
samePlacement[f] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int currentPlacement = 1;
|
||||
for (int j = 0; j < temp.Length; j++)
|
||||
{
|
||||
for (int i = 0; i < temp.Length; i++)
|
||||
{
|
||||
if (temp[j] == players[i])
|
||||
{
|
||||
playerInfoElements[i].textPlacement.text = j+1 + ".";
|
||||
// playerInfoElements[i].textPlacement.text = j+1 + ".";
|
||||
playerInfoElements[i].textPlacement.text = currentPlacement + ".";
|
||||
|
||||
if (!samePlacement[j])
|
||||
{
|
||||
currentPlacement++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.ide.visualstudio": "2.0.17",
|
||||
"com.unity.ide.rider": "3.0.18",
|
||||
"com.unity.ide.visualstudio": "2.0.16",
|
||||
"com.unity.ide.rider": "3.0.16",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
"com.unity.editorcoroutines": "1.0.0",
|
||||
"com.unity.performance.profile-analyzer": "1.1.1",
|
||||
@@ -112,7 +112,7 @@
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.services.core": {
|
||||
"version": "1.7.0",
|
||||
"version": "1.6.0",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
||||
@@ -137,9 +137,7 @@ PlayerSettings:
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 0.1
|
||||
preloadedAssets:
|
||||
- {fileID: -6230802382160794249, guid: 90cd1b71078984c4980fcd1aa03eaaa3, type: 2}
|
||||
- {fileID: 11400000, guid: 48bf7376b3770c44cbfe3f40e77359ab, type: 2}
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
m_HolographicPauseOnTrackingLoss: 1
|
||||
|
||||
Reference in New Issue
Block a user