레스토랑 주문 Dirty 상태 표시
This commit is contained in:
parent
7d82436c0c
commit
161ee3db11
@ -48,7 +48,7 @@ TextureImporter:
|
|||||||
spriteMeshType: 0
|
spriteMeshType: 0
|
||||||
alignment: 0
|
alignment: 0
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
spritePixelsToUnits: 100
|
spritePixelsToUnits: 512
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
alphaUsage: 1
|
alphaUsage: 1
|
||||||
|
@ -136,6 +136,8 @@ private void ApplyHighlightSettings(HighlightEffect highlightComponent)
|
|||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
FetchPlayerInteractorComponent();
|
FetchPlayerInteractorComponent();
|
||||||
|
if(_interactor == null)
|
||||||
|
return;
|
||||||
|
|
||||||
var currentType = GetCurrentOutlineType();
|
var currentType = GetCurrentOutlineType();
|
||||||
_currentOutlineType = currentType; // 디버그용
|
_currentOutlineType = currentType; // 디버그용
|
||||||
|
@ -17,7 +17,9 @@ public abstract class PropUiDisplayComponent<T> : SerializedMonoBehaviour where
|
|||||||
protected IInteractable _interactable;
|
protected IInteractable _interactable;
|
||||||
protected SpriteRenderer _spriteRenderer;
|
protected SpriteRenderer _spriteRenderer;
|
||||||
protected Transform _spriteTransform;
|
protected Transform _spriteTransform;
|
||||||
private void Awake()
|
|
||||||
|
private bool _isInitialized = false;
|
||||||
|
private void Start()
|
||||||
{
|
{
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
@ -44,6 +46,8 @@ protected virtual void Initialize()
|
|||||||
UpdateSpriteTransform();
|
UpdateSpriteTransform();
|
||||||
|
|
||||||
_internalMaterials = GetInteractionDisplayMaterials();
|
_internalMaterials = GetInteractionDisplayMaterials();
|
||||||
|
|
||||||
|
_isInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSprite()
|
private void UpdateSprite()
|
||||||
@ -86,6 +90,11 @@ protected virtual Vector3 GetDisplayRotation()
|
|||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
if (!_isInitialized || !GameFlowManager.Instance.IsGameStarted())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
T interactionType = _interactionSubsystemObject.GetInteractionSubsystemType();
|
T interactionType = _interactionSubsystemObject.GetInteractionSubsystemType();
|
||||||
if (EqualityComparer<T>.Default.Equals(_currentInteractionType, interactionType)) return;
|
if (EqualityComparer<T>.Default.Equals(_currentInteractionType, interactionType)) return;
|
||||||
SetCurrentInteractionType(interactionType);
|
SetCurrentInteractionType(interactionType);
|
||||||
|
@ -52,6 +52,11 @@ protected override Sprite GetDisplaySprite()
|
|||||||
return sprite;
|
return sprite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (GetCurrentInteractionType() == RestaurantOrderType.Dirty)
|
||||||
|
{
|
||||||
|
var sprite = DataManager.Instance.GetSprite(SpriteConstants.DirtyDish);
|
||||||
|
return sprite;
|
||||||
|
}
|
||||||
return base.GetDisplaySprite();
|
return base.GetDisplaySprite();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user