DEG-173-돌발-패널-말풍선-오류 #59
@ -51,6 +51,7 @@ public class PlayerStats : MonoBehaviour,ISaveable
|
||||
private bool _isActiveBubble;
|
||||
private bool _hasShownBubbleToday; // 하루에 말풍선 하나만 표시하기
|
||||
private InteractionAnimationPanelController _interactionAnimation; // 상호작용 패널 Active 여부 확인
|
||||
private HousingCanvasController _housingCanvasController; // 돌발 패널 Active 여부 확인
|
||||
|
||||
private int _mealCount;
|
||||
public int MealCount => _mealCount;
|
||||
@ -149,9 +150,15 @@ public class PlayerStats : MonoBehaviour,ISaveable
|
||||
_interactionAnimation = panelController;
|
||||
}
|
||||
|
||||
public void SetHousingCanvasController(HousingCanvasController canvasController)
|
||||
{
|
||||
_housingCanvasController = canvasController;
|
||||
}
|
||||
|
||||
public void ShowBubble()
|
||||
{
|
||||
if (_interactionAnimation != null && _interactionAnimation.IsPanelActive()) return;
|
||||
if (_housingCanvasController != null && _housingCanvasController.IsSuddenPanelActive()) return;
|
||||
|
||||
if(_isActiveBubble)
|
||||
_speechBubbleFollower.ShowMessage();
|
||||
|
@ -41,7 +41,7 @@ public class ValueByAction
|
||||
{ ActionType.Dungeon, new ActionEffect(+3.0f, -3.0f, 0) },
|
||||
{ ActionType.Housework, new ActionEffect(+1.0f, -1.0f, +0.2f) },
|
||||
{ ActionType.OvertimeWork, new ActionEffect(+4.0f, -5.0f, +1.0f) },
|
||||
{ ActionType.TeamDinner, new ActionEffect(_gameConstants.forcedValue, _gameConstants.forcedValue, 0) }, // 수면 강제(8시 기상) 후 최대 체력
|
||||
{ ActionType.TeamDinner, new ActionEffect(_gameConstants.forcedValue, +8.0f, 0) }, // 수면 강제(8시 기상) 후 최대 체력
|
||||
{ ActionType.Absence, new ActionEffect(0, 0, -3.0f) }
|
||||
};
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ public class InteractionController : MonoBehaviour
|
||||
{
|
||||
PlayerStats.Instance.OnWorked += SuddenAfterWorkEventHappen;
|
||||
PlayerStats.Instance.SetInteractionPanelController(interactionAnimationPanelController);
|
||||
PlayerStats.Instance.SetHousingCanvasController(housingCanvasController);
|
||||
}
|
||||
|
||||
// 상호작용 가능한 사물 범위에 들어올 때
|
||||
|
@ -152,6 +152,12 @@ public class HousingCanvasController : MonoBehaviour
|
||||
|
||||
_autoHideCoroutine = null;
|
||||
}
|
||||
|
||||
public bool IsSuddenPanelActive()
|
||||
{
|
||||
return suddenPanel.activeSelf;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user