임시 테이블 상호작용 UI 추가
This commit is contained in:
parent
7527803a73
commit
6e5f0d2234
@ -98,11 +98,10 @@ GameObject:
|
|||||||
- component: {fileID: 3697702677815423220}
|
- component: {fileID: 3697702677815423220}
|
||||||
- component: {fileID: 3591347921553422000}
|
- component: {fileID: 3591347921553422000}
|
||||||
- component: {fileID: 4456475204957017828}
|
- component: {fileID: 4456475204957017828}
|
||||||
- component: {fileID: 7969024827453302529}
|
|
||||||
- component: {fileID: -6672057808015107341}
|
|
||||||
- component: {fileID: 2950132940454135295}
|
- component: {fileID: 2950132940454135295}
|
||||||
- component: {fileID: 29040892075516248}
|
- component: {fileID: 29040892075516248}
|
||||||
- component: {fileID: 1332098886975329103}
|
- component: {fileID: 1332098886975329103}
|
||||||
|
- component: {fileID: 3786917981383564029}
|
||||||
m_Layer: 7
|
m_Layer: 7
|
||||||
m_Name: RestaurantOrder
|
m_Name: RestaurantOrder
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -160,7 +159,6 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
_currentRestaurantOrderType: 0
|
_currentRestaurantOrderType: 0
|
||||||
--- !u!114 &7969024827453302529
|
|
||||||
--- !u!135 &2950132940454135295
|
--- !u!135 &2950132940454135295
|
||||||
SphereCollider:
|
SphereCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -254,8 +252,56 @@ MonoBehaviour:
|
|||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
--- !u!212 &-6672057808015107341
|
_temporarySprite: {fileID: 21300000, guid: deef7d28045284f449ec0c47e1cbbcdc, type: 3}
|
||||||
SpriteRenderer:
|
--- !u!114 &1332098886975329103
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4103096974375017811}
|
||||||
|
m_Enabled: 0
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f0feb22ab60a4d1885271637838f43b9, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_availableStyle:
|
||||||
|
Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
Width: 1
|
||||||
|
Opacity: 1
|
||||||
|
_focusedStyle:
|
||||||
|
Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||||
|
Width: 1
|
||||||
|
Opacity: 1
|
||||||
|
_unavailableStyle:
|
||||||
|
Color: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||||
|
Width: 0.5
|
||||||
|
Opacity: 1
|
||||||
|
_objectiveStyle:
|
||||||
|
Color: {r: 0, g: 1, b: 1, a: 1}
|
||||||
|
Width: 1
|
||||||
|
Opacity: 1
|
||||||
|
_breathingSpeed: 2
|
||||||
|
_breathingRange: 0.3
|
||||||
|
_enableBreathingEffect: 1
|
||||||
|
_alphaCutOff: 0.5
|
||||||
|
_combineMeshes: 1
|
||||||
|
_constantWidth: 1
|
||||||
|
_outlineQuality: 2
|
||||||
|
_outlineIndependent: 1
|
||||||
|
_outlineBlurPasses: 1
|
||||||
|
_outlineSharpness: 8
|
||||||
|
_currentOutlineType: 0
|
||||||
|
_currentOpacityMultiplier: 1
|
||||||
|
--- !u!114 &3786917981383564029
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4103096974375017811}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
|
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
@ -447,91 +493,3 @@ SpriteRenderer:
|
|||||||
hitFxFadeOutDuration: 0.25
|
hitFxFadeOutDuration: 0.25
|
||||||
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
|
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
hitFxRadius: 0.5
|
hitFxRadius: 0.5
|
||||||
--- !u!114 &1332098886975329103
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4103096974375017811}
|
|
||||||
m_Enabled: 0
|
|
||||||
m_CastShadows: 0
|
|
||||||
m_ReceiveShadows: 0
|
|
||||||
m_DynamicOccludee: 1
|
|
||||||
m_StaticShadowCaster: 0
|
|
||||||
m_MotionVectors: 1
|
|
||||||
m_LightProbeUsage: 1
|
|
||||||
m_ReflectionProbeUsage: 1
|
|
||||||
m_RayTracingMode: 0
|
|
||||||
m_RayTraceProcedural: 0
|
|
||||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
|
||||||
m_RayTracingAccelStructBuildFlags: 1
|
|
||||||
m_SmallMeshCulling: 1
|
|
||||||
m_RenderingLayerMask: 1
|
|
||||||
m_RendererPriority: 0
|
|
||||||
m_Materials:
|
|
||||||
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
|
||||||
m_StaticBatchInfo:
|
|
||||||
firstSubMesh: 0
|
|
||||||
subMeshCount: 0
|
|
||||||
m_StaticBatchRoot: {fileID: 0}
|
|
||||||
m_ProbeAnchor: {fileID: 0}
|
|
||||||
m_LightProbeVolumeOverride: {fileID: 0}
|
|
||||||
m_ScaleInLightmap: 1
|
|
||||||
m_ReceiveGI: 1
|
|
||||||
m_PreserveUVs: 0
|
|
||||||
m_IgnoreNormalsForChartDetection: 0
|
|
||||||
m_ImportantGI: 0
|
|
||||||
m_StitchLightmapSeams: 1
|
|
||||||
m_SelectedEditorRenderState: 0
|
|
||||||
m_MinimumChartSize: 4
|
|
||||||
m_AutoUVMaxDistance: 0.5
|
|
||||||
m_AutoUVMaxAngle: 89
|
|
||||||
m_LightmapParameters: {fileID: 0}
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingLayer: 0
|
|
||||||
m_SortingOrder: 0
|
|
||||||
m_Sprite: {fileID: 21300000, guid: 22cbc31c0f91548f096d10d462447973, type: 3}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_FlipX: 0
|
|
||||||
m_FlipY: 0
|
|
||||||
m_DrawMode: 0
|
|
||||||
m_Size: {x: 0.34, y: 0.34}
|
|
||||||
m_AdaptiveModeThreshold: 0.5
|
|
||||||
m_SpriteTileMode: 0
|
|
||||||
m_WasSpriteAssigned: 1
|
|
||||||
m_MaskInteraction: 0
|
|
||||||
m_SpriteSortPoint: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: f0feb22ab60a4d1885271637838f43b9, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
_availableStyle:
|
|
||||||
Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
Width: 1
|
|
||||||
Opacity: 1
|
|
||||||
_focusedStyle:
|
|
||||||
Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
|
||||||
Width: 1
|
|
||||||
Opacity: 1
|
|
||||||
_unavailableStyle:
|
|
||||||
Color: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
|
||||||
Width: 0.5
|
|
||||||
Opacity: 1
|
|
||||||
_objectiveStyle:
|
|
||||||
Color: {r: 0, g: 1, b: 1, a: 1}
|
|
||||||
Width: 1
|
|
||||||
Opacity: 1
|
|
||||||
_breathingSpeed: 2
|
|
||||||
_breathingRange: 0.3
|
|
||||||
_enableBreathingEffect: 1
|
|
||||||
_alphaCutOff: 0.5
|
|
||||||
_combineMeshes: 1
|
|
||||||
_constantWidth: 1
|
|
||||||
_outlineQuality: 2
|
|
||||||
_outlineIndependent: 1
|
|
||||||
_outlineBlurPasses: 1
|
|
||||||
_outlineSharpness: 8
|
|
||||||
_currentOutlineType: 0
|
|
||||||
_currentOpacityMultiplier: 1
|
|
||||||
|
@ -10,7 +10,7 @@ public abstract class PropUiDisplayComponent<T> : SerializedMonoBehaviour where
|
|||||||
private IInteractionSubsystemObject<T> _interactionSubsystemObject;
|
private IInteractionSubsystemObject<T> _interactionSubsystemObject;
|
||||||
private Dictionary<T, Material> _materialDictionary;
|
private Dictionary<T, Material> _materialDictionary;
|
||||||
private T _prevInteractionType;
|
private T _prevInteractionType;
|
||||||
private SpriteRenderer _spriteRenderer;
|
protected SpriteRenderer _spriteRenderer;
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
Initialize();
|
Initialize();
|
||||||
@ -21,20 +21,18 @@ private void Awake()
|
|||||||
protected virtual void Initialize()
|
protected virtual void Initialize()
|
||||||
{
|
{
|
||||||
bool isInteractionSubsystem = gameObject.TryGetComponent(out _interactionSubsystemObject);
|
bool isInteractionSubsystem = gameObject.TryGetComponent(out _interactionSubsystemObject);
|
||||||
|
var interactable = GetComponent<IInteractable>();
|
||||||
if (!isInteractionSubsystem)
|
if (!isInteractionSubsystem)
|
||||||
{
|
{
|
||||||
Debug.LogError($"Interaction Subsystem<{typeof(T)}> is not exist");
|
Debug.LogError($"Interaction Subsystem<{typeof(T)}> is not exist");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TryGetComponent(out _spriteRenderer))
|
// TODO: 임시 나중에 제대로 수정할 것
|
||||||
{
|
var uiGameObject = Instantiate(new GameObject("TemporaryUi"), transform);
|
||||||
_spriteRenderer = gameObject.AddComponent<SpriteRenderer>();
|
uiGameObject.transform.position = interactable.GetInteractionPoints()[0] + Vector3.up * 2;
|
||||||
// TODO 임시값, 나중에 제대로 수정할 것
|
_spriteRenderer = uiGameObject.AddComponent<SpriteRenderer>();
|
||||||
_spriteRenderer.sortingOrder = 100;
|
_spriteRenderer.enabled = false;
|
||||||
_spriteRenderer.enabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_materialDictionary = SetMaterialDictionary();
|
_materialDictionary = SetMaterialDictionary();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,11 +8,19 @@ namespace DDD.Restaurant
|
|||||||
{
|
{
|
||||||
public class RestaurantUiDisplayComponent : PropUiDisplayComponent<RestaurantOrderType>
|
public class RestaurantUiDisplayComponent : PropUiDisplayComponent<RestaurantOrderType>
|
||||||
{
|
{
|
||||||
|
[SerializeField]
|
||||||
|
private Sprite _temporarySprite;
|
||||||
[OdinSerialize]
|
[OdinSerialize]
|
||||||
private Dictionary<RestaurantOrderType, Material> _materialDictionary = new();
|
private Dictionary<RestaurantOrderType, Material> _materialDictionary = new();
|
||||||
protected override Dictionary<RestaurantOrderType, Material> SetMaterialDictionary()
|
protected override Dictionary<RestaurantOrderType, Material> SetMaterialDictionary()
|
||||||
{
|
{
|
||||||
return _materialDictionary;
|
return _materialDictionary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
_spriteRenderer.sprite = _temporarySprite;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user