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