在庫メーター切り替え追加コミット
This commit is contained in:
parent
0b73bf2a79
commit
22b32e318b
|
|
@ -7,6 +7,7 @@ public class ShopStockView : MonoBehaviour
|
||||||
[SerializeField] private SpriteRenderer popcornImage;
|
[SerializeField] private SpriteRenderer popcornImage;
|
||||||
[SerializeField] private float maxPosision = 0.16f;
|
[SerializeField] private float maxPosision = 0.16f;
|
||||||
[SerializeField] private float minPosision = -0.8f;
|
[SerializeField] private float minPosision = -0.8f;
|
||||||
|
[SerializeField] private GameObject textObject;
|
||||||
|
|
||||||
public void SetStock(List<StorageTank> tanks)
|
public void SetStock(List<StorageTank> tanks)
|
||||||
{
|
{
|
||||||
|
|
@ -16,4 +17,9 @@ public class ShopStockView : MonoBehaviour
|
||||||
newPos.y = Mathf.Lerp(minPosision, maxPosision, (float) totalStock / totalCapacity);
|
newPos.y = Mathf.Lerp(minPosision, maxPosision, (float) totalStock / totalCapacity);
|
||||||
popcornImage.transform.localPosition = newPos;
|
popcornImage.transform.localPosition = newPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetTextActive(bool active)
|
||||||
|
{
|
||||||
|
textObject.SetActive(active);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue