요리 더미 로직 연결
This commit is contained in:
parent
6929728b23
commit
16415ac426
@ -24,12 +24,11 @@ public bool IsCancelButtonVisible
|
|||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Cleanup()
|
public override void Cleanup()
|
||||||
{
|
{
|
||||||
base.Cleanup();
|
|
||||||
_onCancel = null;
|
_onCancel = null;
|
||||||
_onConfirm = null;
|
_onConfirm = null;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ protected override void OnCreatedInitializeBasePopup()
|
|||||||
|
|
||||||
protected override void OnOpenedEventsBasePopup(OpenPopupUiEvent evt)
|
protected override void OnOpenedEventsBasePopup(OpenPopupUiEvent evt)
|
||||||
{
|
{
|
||||||
_viewModel?.Initialize();
|
_viewModel.Initialize();
|
||||||
|
|
||||||
if (_viewModel && _bindingContext != null)
|
if (_viewModel && _bindingContext != null)
|
||||||
{
|
{
|
||||||
@ -92,7 +92,7 @@ protected override void OnClosedEventsBasePopup(ClosePopupUiEvent evt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
OnClosedEventsPopup(evt);
|
OnClosedEventsPopup(evt);
|
||||||
_viewModel?.Cleanup();
|
_viewModel.Cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnInputStarted(TInputEnum actionEnum, InputAction.CallbackContext context)
|
private void OnInputStarted(TInputEnum actionEnum, InputAction.CallbackContext context)
|
||||||
|
@ -119,7 +119,8 @@ private void HandleInteract1()
|
|||||||
|
|
||||||
private void HandleInteract2()
|
private void HandleInteract2()
|
||||||
{
|
{
|
||||||
// TODO : 요리 선택 (미니게임 더미 연출)
|
_viewModel.OnStartedCooking?.Invoke();
|
||||||
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAddedCookTabSelected(int index)
|
private void OnAddedCookTabSelected(int index)
|
||||||
|
@ -67,9 +67,6 @@ public SelectedCookSnapshot SelectedCookSnapshot
|
|||||||
|
|
||||||
public ItemSlotUi SelectedCookSlot { get; private set; }
|
public ItemSlotUi SelectedCookSlot { get; private set; }
|
||||||
|
|
||||||
private RestaurantManagementData GetRestaurantManagementData() => RestaurantData.Instance.ManagementData;
|
|
||||||
private RestaurantManagementState GetRestaurantManagementState() => RestaurantState.Instance.ManagementState;
|
|
||||||
|
|
||||||
private int _currentCookIndex = -1;
|
private int _currentCookIndex = -1;
|
||||||
public int CurrentCookIndex
|
public int CurrentCookIndex
|
||||||
{
|
{
|
||||||
@ -81,7 +78,20 @@ public int CurrentCookIndex
|
|||||||
private InventorySortType _currentSortType = InventorySortType.None;
|
private InventorySortType _currentSortType = InventorySortType.None;
|
||||||
|
|
||||||
public event Action OnAddedIngredients;
|
public event Action OnAddedIngredients;
|
||||||
|
public Action OnStartedCooking;
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
OnStartedCooking += StartCooking;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Cleanup()
|
||||||
|
{
|
||||||
|
OnStartedCooking -= StartCooking;
|
||||||
|
}
|
||||||
|
|
||||||
|
private RestaurantManagementData GetRestaurantManagementData() => RestaurantData.Instance.ManagementData;
|
||||||
|
private RestaurantManagementState GetRestaurantManagementState() => RestaurantState.Instance.ManagementState;
|
||||||
public GameObject GetInitialSelected() => _addedCookItemSlots[0].gameObject;
|
public GameObject GetInitialSelected() => _addedCookItemSlots[0].gameObject;
|
||||||
|
|
||||||
public void SetCookwareType(CookwareType cookwareType)
|
public void SetCookwareType(CookwareType cookwareType)
|
||||||
@ -249,5 +259,16 @@ private void UpdateSelectedCook()
|
|||||||
tastes: tastes,
|
tastes: tastes,
|
||||||
tasteMaterial: tasteMat);
|
tasteMaterial: tasteMat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void StartCooking()
|
||||||
|
{
|
||||||
|
// TODO : 플레이어가 선택된 요리 들기
|
||||||
|
|
||||||
|
|
||||||
|
// TODO : 미니 게임 메세지로 대체 (임시)
|
||||||
|
var evt = GameEvents.ShowGlobalMessageEvent;
|
||||||
|
evt.Set("cooking_minigame_dummy_message", 2f, newTextColor: Color.green);
|
||||||
|
EventBus.Broadcast(evt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,7 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Localization;
|
|
||||||
|
|
||||||
namespace DDD.Restaurant
|
namespace DDD.Restaurant
|
||||||
{
|
{
|
||||||
@ -24,14 +23,12 @@ public class RestaurantManagementViewModel : SimpleViewModel, IEventHandler<Toda
|
|||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
|
||||||
RegisterEvents();
|
RegisterEvents();
|
||||||
ResetHoldState();
|
ResetHoldState();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Cleanup()
|
public override void Cleanup()
|
||||||
{
|
{
|
||||||
base.Cleanup();
|
|
||||||
UnregisterEvents();
|
UnregisterEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user