Trade WIP
This commit is contained in:
13
Assets/Game/Scripts/Rotator.cs
Normal file
13
Assets/Game/Scripts/Rotator.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Rotator : MonoBehaviour
|
||||
{
|
||||
public Vector3 rotationVector;
|
||||
|
||||
void Update()
|
||||
{
|
||||
transform.Rotate(rotationVector);
|
||||
}
|
||||
}
|
||||
11
Assets/Game/Scripts/Rotator.cs.meta
Normal file
11
Assets/Game/Scripts/Rotator.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d15ae079e941bca4c90d983a184abc2b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -11,7 +11,7 @@ public class TradeMenu : MonoBehaviour
|
||||
{
|
||||
public Transform tradeListParent;
|
||||
public GameObject tradeListItem;
|
||||
|
||||
public GameObject refreshIndicator;
|
||||
public TMP_Text coinsTxt;
|
||||
public TMP_Text gemsTxt;
|
||||
public List<GameObject> pooledEntries;
|
||||
@@ -41,6 +41,7 @@ public class TradeMenu : MonoBehaviour
|
||||
public bool refreshing = false;
|
||||
public async void Refresh(){
|
||||
refreshing = true;
|
||||
refreshIndicator.SetActive(true);
|
||||
//Clean existing entries
|
||||
foreach(GameObject entry in pooledEntries){entry.SetActive(false);}
|
||||
coinsTxt.text = DBmanager.Coins.ToString();
|
||||
@@ -109,7 +110,7 @@ public class TradeMenu : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
|
||||
refreshIndicator.SetActive(false);
|
||||
refreshing=false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user