Item Shop getting prices from linked items
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user