Item Shop getting prices from linked items

This commit is contained in:
brausjonas
2023-04-14 22:40:50 +02:00
parent 9000450834
commit d63c43deb5
6 changed files with 25 additions and 19 deletions
+1 -1
View File
@@ -165,7 +165,7 @@
<workItem from="1680813239896" duration="4155000" />
<workItem from="1681056387914" duration="882000" />
<workItem from="1681415672515" duration="5000" />
<workItem from="1681479671396" duration="7481000" />
<workItem from="1681479671396" duration="8956000" />
</task>
<servers />
</component>
+5 -6
View File
@@ -6042,7 +6042,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 5
m_text: 0
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 30b250cb342768045acde7309e218e46, type: 2}
m_sharedMaterial: {fileID: -996942129922571021, guid: 30b250cb342768045acde7309e218e46, type: 2}
@@ -32820,7 +32820,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1235522789
RectTransform:
m_ObjectHideFlags: 0
@@ -32861,6 +32861,7 @@ MonoBehaviour:
items:
- {fileID: 1547369680}
- {fileID: 1261969992}
- {fileID: 200446444}
--- !u!1 &1237875978
GameObject:
m_ObjectHideFlags: 0
@@ -33354,9 +33355,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: '10
'
m_text: 0
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 30b250cb342768045acde7309e218e46, type: 2}
m_sharedMaterial: {fileID: -996942129922571021, guid: 30b250cb342768045acde7309e218e46, type: 2}
@@ -43781,7 +43780,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 3
m_text: 0
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 30b250cb342768045acde7309e218e46, type: 2}
m_sharedMaterial: {fileID: -996942129922571021, guid: 30b250cb342768045acde7309e218e46, type: 2}
+10
View File
@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class ItemShop : MonoBehaviour
@@ -12,4 +13,13 @@ public class ItemShop : MonoBehaviour
{
currentPlayer = _currentPlayer;
}
private void Start()
{
foreach(UIItem ui in items)
{
TMP_Text text = ui.GetComponentInChildren<TMP_Text>();
text.text = ui.item.Cost + "";
}
}
}
@@ -110,7 +110,7 @@ public class PlayablePlayer : Player
jumpRequest = true;
wurfelt = true;
wurfelZahl = Random.Range(4, 5);
wurfelZahl = Random.Range(1, 7);
switch (activeItem)
{
@@ -255,10 +255,8 @@ public class PlayablePlayer : Player
// }
// break;
case 2:
int randCoins1 = Random.Range(2, 12);
int randCoins2 = Random.Range(5, 10);
int randCoins1 = Random.Range(2, 6);
int randCoins2 = Random.Range(1, 4);
int randCoins3 = Random.Range(-6, 0);
RandomRotator rotator = uiHandler.rotator.GetComponent<RandomRotator>();
@@ -294,9 +292,8 @@ public class PlayablePlayer : Player
}
rotatorStopIndex = randomOption;
Invoke("StopRotator", 4);
Invoke("ActivateLayout1", 7.5f);
Invoke("StopRotator", 2);
Invoke("ActivateLayout1", 5.5f);
break;
}
@@ -136,7 +136,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.14
bundleVersion: 0.16
preloadedAssets:
- {fileID: -6230802382160794249, guid: 90cd1b71078984c4980fcd1aa03eaaa3, type: 2}
- {fileID: 11400000, guid: 48bf7376b3770c44cbfe3f40e77359ab, type: 2}
@@ -160,13 +160,13 @@ PlayerSettings:
androidMaxAspectRatio: 2.1
applicationIdentifier:
Android: com.IOGameStudios.FlufflParty
Standalone: com.IO-Game-Studios.FlufflParty
Standalone: com.IOGameStudios.FlufflParty
buildNumber:
Standalone: 0
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 4
AndroidBundleVersionCode: 6
AndroidMinSdkVersion: 26
AndroidTargetSdkVersion: 31
AndroidPreferredInstallLocation: 2