2026-04-17 장보기 목록 버튼 할당 진행중
This commit is contained in:
Binary file not shown.
8
Assets/02_Scripts/Data.meta
Normal file
8
Assets/02_Scripts/Data.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42138610c79ac4d458c8348120e399c4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/02_Scripts/Data/Shopping.meta
Normal file
8
Assets/02_Scripts/Data/Shopping.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a796fd34ac5e02e4391fefa802c64cb9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Assets/02_Scripts/Data/Shopping/ShoppingOrderEntry.cs
Normal file
15
Assets/02_Scripts/Data/Shopping/ShoppingOrderEntry.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using VRShopping.Items;
|
||||
|
||||
namespace VRShopping.Shopping
|
||||
{
|
||||
[Serializable]
|
||||
public class ShoppingOrderEntry
|
||||
{
|
||||
[UnityEngine.SerializeField] private ProductGroup _productGroup;
|
||||
[UnityEngine.SerializeField, UnityEngine.Min(1)] private int _requiredQuantity = 1;
|
||||
|
||||
public ProductGroup ProductGroup => _productGroup;
|
||||
public int RequiredQuantity => _requiredQuantity;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a087096c894c024aa409c35c9b1b87d
|
||||
14
Assets/02_Scripts/Data/Shopping/ShoppingOrderList.cs
Normal file
14
Assets/02_Scripts/Data/Shopping/ShoppingOrderList.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace VRShopping.Shopping
|
||||
{
|
||||
[CreateAssetMenu(fileName = "ShoppingOrderList", menuName = "VR Shopping/Shopping Order List", order = 1)]
|
||||
public class ShoppingOrderList : ScriptableObject
|
||||
{
|
||||
[SerializeField] private List<ShoppingOrderEntry> _entries = new List<ShoppingOrderEntry>();
|
||||
|
||||
public IReadOnlyList<ShoppingOrderEntry> Entries => _entries;
|
||||
public int Count => _entries.Count;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79a3b1f54c1b0164ab96b9fc0618d0d5
|
||||
@@ -10,22 +10,24 @@ public class ItemData : ScriptableObject
|
||||
[SerializeField] private string _displayName;
|
||||
[SerializeField] private string _brand;
|
||||
[SerializeField] private ItemCategory _category;
|
||||
[SerializeField] private ProductGroup _productGroup;
|
||||
|
||||
[Header("Pricing")]
|
||||
[SerializeField, Min(0)] private int _basePrice;
|
||||
[SerializeField, Range(0f, 1f)] private float _discountRate;
|
||||
|
||||
[Header("Visuals")]
|
||||
[SerializeField] private Sprite _icon;
|
||||
//[SerializeField] private Sprite _icon;
|
||||
[SerializeField] private GameObject _prefab;
|
||||
|
||||
public string ItemId => _itemId;
|
||||
public string DisplayName => _displayName;
|
||||
public string Brand => _brand;
|
||||
public ItemCategory Category => _category;
|
||||
public ProductGroup ProductGroup => _productGroup;
|
||||
public int BasePrice => _basePrice;
|
||||
public float DiscountRate => _discountRate;
|
||||
public Sprite Icon => _icon;
|
||||
//public Sprite Icon => _icon;
|
||||
public GameObject Prefab => _prefab;
|
||||
|
||||
public int FinalPrice => Mathf.RoundToInt(_basePrice * (1f - _discountRate));
|
||||
@@ -43,4 +45,11 @@ public enum ItemCategory
|
||||
Household,
|
||||
Etc
|
||||
}
|
||||
|
||||
public enum ProductGroup
|
||||
{
|
||||
None,
|
||||
ChocoBar,
|
||||
PotatoChip,
|
||||
}
|
||||
}
|
||||
|
||||
29
Assets/02_Scripts/Managers/InputManager.cs
Normal file
29
Assets/02_Scripts/Managers/InputManager.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class InputManager : MonoBehaviour
|
||||
{
|
||||
public static InputManager Instance;
|
||||
|
||||
//인풋 매니저는 눌린 키에 대한 이벤트만 실행함. 어떤 로직이 등록되어있는지는 모른다.
|
||||
public event Action XRLeftControllerPrimaryButton_Event;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = this; //만들어진 자신을 인스턴스로 설정
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy(gameObject); //이미 인스턴스가 있으면 자신을 파괴
|
||||
}
|
||||
}
|
||||
|
||||
public void XRLeftControllerPrimaryButton(InputAction.CallbackContext ctx)
|
||||
{
|
||||
if(ctx.started)
|
||||
XRLeftControllerPrimaryButton_Event?.Invoke();
|
||||
}
|
||||
}
|
||||
2
Assets/02_Scripts/Managers/InputManager.cs.meta
Normal file
2
Assets/02_Scripts/Managers/InputManager.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7932f9ffafd2066489578f2cc9e366d9
|
||||
@@ -104,6 +104,8 @@ private async Awaitable SceneChange(string sceneName)
|
||||
{
|
||||
try
|
||||
{
|
||||
SetSceneLoadingProgressValue(0f);
|
||||
|
||||
await SetSceneLoadingActive(true,1f);
|
||||
|
||||
AsyncOperation op = SceneManager.LoadSceneAsync(sceneName);
|
||||
|
||||
8
Assets/02_Scripts/Player.meta
Normal file
8
Assets/02_Scripts/Player.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b429503fb9f36be47b514764a3aaeadf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
10
Assets/02_Scripts/Player/PlayerController.cs
Normal file
10
Assets/02_Scripts/Player/PlayerController.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerController : MonoBehaviour
|
||||
{
|
||||
|
||||
private void Start()
|
||||
{
|
||||
//InputManager.Instance.XRLeftControllerPrimaryButton_Event += 장보기 목록 온오프 함수
|
||||
}
|
||||
}
|
||||
2
Assets/02_Scripts/Player/PlayerController.cs.meta
Normal file
2
Assets/02_Scripts/Player/PlayerController.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e811ab6255885cc4cba7041d4f936b75
|
||||
@@ -9,7 +9,7 @@ public class ItemInfoPanel : MonoBehaviour
|
||||
{
|
||||
[Header("Refs")]
|
||||
[SerializeField] private GameObject _root;
|
||||
[SerializeField] private Image _iconImage;
|
||||
//[SerializeField] private Image _iconImage;
|
||||
[SerializeField] private TMP_Text _nameText;
|
||||
[SerializeField] private TMP_Text _brandText;
|
||||
[SerializeField] private TMP_Text _priceText;
|
||||
@@ -31,11 +31,13 @@ public void Show(ItemData data)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
if (_iconImage != null)
|
||||
{
|
||||
_iconImage.sprite = data.Icon;
|
||||
_iconImage.enabled = data.Icon != null;
|
||||
}
|
||||
*/
|
||||
|
||||
if (_nameText != null) _nameText.text = data.DisplayName;
|
||||
if (_brandText != null) _brandText.text = data.Brand;
|
||||
|
||||
24
Assets/02_Scripts/UI/ShoppingOrderRow.cs
Normal file
24
Assets/02_Scripts/UI/ShoppingOrderRow.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using VRShopping.Shopping;
|
||||
|
||||
namespace VRShopping.UI
|
||||
{
|
||||
public class ShoppingOrderRow : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_Text _nameText;
|
||||
[SerializeField] private TMP_Text _quantityText;
|
||||
|
||||
public void Bind(ShoppingOrderEntry entry)
|
||||
{
|
||||
if (entry == null)
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_nameText != null) _nameText.text = entry.ProductGroup.ToString();
|
||||
if (_quantityText != null) _quantityText.text = $"x{entry.RequiredQuantity}";
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/02_Scripts/UI/ShoppingOrderRow.cs.meta
Normal file
2
Assets/02_Scripts/UI/ShoppingOrderRow.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83f128a612dc1154e829fd29b9537948
|
||||
33
Assets/02_Scripts/UI/ShoppingOrderView.cs
Normal file
33
Assets/02_Scripts/UI/ShoppingOrderView.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using UnityEngine;
|
||||
using VRShopping.Shopping;
|
||||
|
||||
namespace VRShopping.UI
|
||||
{
|
||||
public class ShoppingOrderView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private ShoppingOrderList _orderList;
|
||||
[SerializeField] private ShoppingOrderRow _rowPrefab;
|
||||
[SerializeField] private Transform _rowContainer;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Rebuild();
|
||||
}
|
||||
|
||||
public void Rebuild()
|
||||
{
|
||||
if (_orderList == null || _rowPrefab == null || _rowContainer == null) return;
|
||||
|
||||
for (int i = _rowContainer.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
Destroy(_rowContainer.GetChild(i).gameObject);
|
||||
}
|
||||
|
||||
foreach (var entry in _orderList.Entries)
|
||||
{
|
||||
var row = Instantiate(_rowPrefab, _rowContainer);
|
||||
row.Bind(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/02_Scripts/UI/ShoppingOrderView.cs.meta
Normal file
2
Assets/02_Scripts/UI/ShoppingOrderView.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cc0bf1dd5e1c2a459d8fb6ace6a166a
|
||||
BIN
Assets/04_Textures/MemoPaper.png
LFS
Normal file
BIN
Assets/04_Textures/MemoPaper.png
LFS
Normal file
Binary file not shown.
143
Assets/04_Textures/MemoPaper.png.meta
Normal file
143
Assets/04_Textures/MemoPaper.png.meta
Normal file
@@ -0,0 +1,143 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e368d28e5c2fe84f9d127fa13070588
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/07_UI.meta
Normal file
8
Assets/07_UI.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 184edff3843438e4caff8abc71666d08
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/07_UI/Shopping.meta
Normal file
8
Assets/07_UI/Shopping.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b51c3b42530ddc94682082acb3a19437
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/07_UI/Shopping/Prefabs.meta
Normal file
8
Assets/07_UI/Shopping/Prefabs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 38d317c90b99e0f46b79d779c9db19e0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/07_UI/Shopping/Prefabs/ShoppingOrderRow.prefab
LFS
Normal file
BIN
Assets/07_UI/Shopping/Prefabs/ShoppingOrderRow.prefab
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbbb9560bc7c1f4439fbe415c92c4299
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/08_Data.meta
Normal file
8
Assets/08_Data.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a3c288e277f563419798ee73be3f8ff
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/08_Data/Items.meta
Normal file
8
Assets/08_Data/Items.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3dc984d3b9f25cd4989af63102b3d9c9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/08_Data/Items/ChocoBar.asset
LFS
Normal file
BIN
Assets/08_Data/Items/ChocoBar.asset
LFS
Normal file
Binary file not shown.
8
Assets/08_Data/Items/ChocoBar.asset.meta
Normal file
8
Assets/08_Data/Items/ChocoBar.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 174fd6d2cf1a28c4ca33bb3c1e7e64c8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/08_Data/Items/PotatoChip.asset
LFS
Normal file
BIN
Assets/08_Data/Items/PotatoChip.asset
LFS
Normal file
Binary file not shown.
8
Assets/08_Data/Items/PotatoChip.asset.meta
Normal file
8
Assets/08_Data/Items/PotatoChip.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5484240754a03643b2d57e2ab6cf155
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/08_Data/Shopping.meta
Normal file
8
Assets/08_Data/Shopping.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 070f155b1a4803e4d83ef63351b0a8d3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/08_Data/Shopping/ShoppingOrderList.asset
LFS
Normal file
BIN
Assets/08_Data/Shopping/ShoppingOrderList.asset
LFS
Normal file
Binary file not shown.
8
Assets/08_Data/Shopping/ShoppingOrderList.asset.meta
Normal file
8
Assets/08_Data/Shopping/ShoppingOrderList.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 825fc680df5c90f4bbbab0a61674a1e5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user