버그 수정
This commit is contained in:
71
Assets/02_Scripts/Item/ProductGroupExtensions.cs
Normal file
71
Assets/02_Scripts/Item/ProductGroupExtensions.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
namespace VRShopping.Items
|
||||
{
|
||||
// ProductGroup의 사용자 표시용 한글 라벨.
|
||||
// UI 표시(쇼핑 목록, 부족 항목 등)에는 ToKorean()을 사용.
|
||||
public static class ProductGroupExtensions
|
||||
{
|
||||
public static string ToKorean(this ProductGroup group)
|
||||
{
|
||||
return group switch
|
||||
{
|
||||
ProductGroup.None => "없음",
|
||||
ProductGroup.ChocoBar => "초코바",
|
||||
ProductGroup.PotatoChip => "감자칩",
|
||||
ProductGroup.GreenBeans => "그린빈",
|
||||
ProductGroup.CheeseChip => "치즈칩",
|
||||
ProductGroup.Rice => "쌀",
|
||||
ProductGroup.Pasta => "파스타",
|
||||
ProductGroup.Butter => "버터",
|
||||
ProductGroup.Cheese => "치즈",
|
||||
ProductGroup.Milk => "우유",
|
||||
ProductGroup.Diaper => "기저귀",
|
||||
ProductGroup.GrainMixTea => "곡물차",
|
||||
ProductGroup.Shampoo => "샴푸",
|
||||
ProductGroup.Conditioner => "린스",
|
||||
ProductGroup.HairSpray => "헤어스프레이",
|
||||
ProductGroup.ShaveFoam => "면도크림",
|
||||
ProductGroup.SunCream => "선크림",
|
||||
ProductGroup.Lotion => "로션",
|
||||
ProductGroup.Gum => "껌",
|
||||
ProductGroup.WetWipes => "물티슈",
|
||||
ProductGroup.Toothpaste => "치약",
|
||||
ProductGroup.DogFood => "강아지 사료",
|
||||
ProductGroup.JAM => "잼",
|
||||
ProductGroup.Juice => "주스",
|
||||
ProductGroup.LaundryDetergent => "세탁 세제",
|
||||
ProductGroup.ClothesConditioner => "섬유유연제",
|
||||
ProductGroup.Coffee => "커피",
|
||||
ProductGroup.Cleaner => "세정제",
|
||||
ProductGroup.Candy => "사탕",
|
||||
ProductGroup.Jelly => "젤리",
|
||||
ProductGroup.Soda => "탄산음료",
|
||||
ProductGroup.Yogurt => "요거트",
|
||||
ProductGroup.Water => "생수",
|
||||
ProductGroup.SoftFlour => "박력분",
|
||||
ProductGroup.StrongFlour => "강력분",
|
||||
ProductGroup.MediumFlour => "중력분",
|
||||
ProductGroup.Icecream => "아이스크림",
|
||||
ProductGroup.Watermelon => "수박",
|
||||
ProductGroup.Orange => "오렌지",
|
||||
ProductGroup.Apple => "사과",
|
||||
ProductGroup.Banana => "바나나",
|
||||
ProductGroup.Paprika => "파프리카",
|
||||
ProductGroup.Potato => "감자",
|
||||
ProductGroup.Cabbage => "양배추",
|
||||
ProductGroup.Broccoli => "브로콜리",
|
||||
ProductGroup.Aubergine => "가지",
|
||||
ProductGroup.Tomato => "토마토",
|
||||
ProductGroup.Cucumber => "오이",
|
||||
ProductGroup.Onion => "양파",
|
||||
ProductGroup.Bacon => "베이컨",
|
||||
ProductGroup.Cookie => "쿠키",
|
||||
ProductGroup.Cereal => "시리얼",
|
||||
ProductGroup.GreenTea => "녹차",
|
||||
ProductGroup.Ketchup => "케첩",
|
||||
ProductGroup.Mustard => "머스타드",
|
||||
ProductGroup.Soup => "수프",
|
||||
_ => group.ToString()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/02_Scripts/Item/ProductGroupExtensions.cs.meta
Normal file
2
Assets/02_Scripts/Item/ProductGroupExtensions.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 771a141a621a0c74e9be8b2129869324
|
||||
@@ -58,7 +58,7 @@ public void Checkout(CheckoutMachine checkoutMachine)
|
||||
else
|
||||
{
|
||||
var parts = new List<string>(missing.Count);
|
||||
foreach (var (group, shortage) in missing) parts.Add($"{group} x{shortage}");
|
||||
foreach (var (group, shortage) in missing) parts.Add($"{group.ToKorean()} x{shortage}");
|
||||
GameManager.Instance.GameSceneUI.ShowMissingPanel(parts);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,16 @@ public class BGMHud : MonoBehaviour
|
||||
|
||||
private BGMBox currentBgm;
|
||||
[SerializeField] private BGMClip DefaultBgm;
|
||||
[SerializeField, Min(0f)] private float _defaultBgmStartDelay = 5f;
|
||||
|
||||
public void Start()
|
||||
public async void Start()
|
||||
{
|
||||
if (_defaultBgmStartDelay > 0f)
|
||||
await Awaitable.WaitForSecondsAsync(_defaultBgmStartDelay);
|
||||
|
||||
// 지연 도중에 이미 다른 곡이 재생되었으면 디폴트는 건너뜀
|
||||
if (currentBgm != null) return;
|
||||
|
||||
BGMBox[] BGMBoxs = GetComponentsInChildren<BGMBox>(true);
|
||||
|
||||
foreach (BGMBox bgm in BGMBoxs)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using VRShopping.Items;
|
||||
using VRShopping.Shopping;
|
||||
|
||||
namespace VRShopping.UI
|
||||
@@ -17,7 +18,7 @@ public void Bind(ShoppingOrderEntry entry)
|
||||
return;
|
||||
}
|
||||
|
||||
if (_nameText != null) _nameText.text = entry.ProductGroup.ToString();
|
||||
if (_nameText != null) _nameText.text = entry.ProductGroup.ToKorean();
|
||||
if (_quantityText != null) _quantityText.text = $"x{entry.RequiredQuantity}";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user