Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
83da52c864
@ -15,7 +15,7 @@ public string MenuId
|
|||||||
|
|
||||||
public class RestaurantOrderEvent : IEvent
|
public class RestaurantOrderEvent : IEvent
|
||||||
{
|
{
|
||||||
public string MenuId;
|
public string RecipeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RestaurantOrderSolver_Order : RestaurantOrderSolverBase
|
public class RestaurantOrderSolver_Order : RestaurantOrderSolverBase
|
||||||
@ -50,7 +50,7 @@ public override bool ExecuteInteractionSubsystem(IInteractor interactor, IIntera
|
|||||||
orderPayload.MenuId = foodMenu;
|
orderPayload.MenuId = foodMenu;
|
||||||
|
|
||||||
RestaurantOrderEvent evt = new RestaurantOrderEvent();
|
RestaurantOrderEvent evt = new RestaurantOrderEvent();
|
||||||
evt.MenuId = foodMenu;
|
evt.RecipeId = foodMenu;
|
||||||
EventBus.Broadcast(evt);
|
EventBus.Broadcast(evt);
|
||||||
|
|
||||||
return base.ExecuteInteractionSubsystem(interactor, interactable, payload);
|
return base.ExecuteInteractionSubsystem(interactor, interactable, payload);
|
||||||
|
@ -19,6 +19,12 @@ private void Start()
|
|||||||
public void HandleEvent(RestaurantOrderEvent evt)
|
public void HandleEvent(RestaurantOrderEvent evt)
|
||||||
{
|
{
|
||||||
var billItem = Instantiate(_billItemPrefab, _billItemsLayoutTransform);
|
var billItem = Instantiate(_billItemPrefab, _billItemsLayoutTransform);
|
||||||
|
var recipeData = DataManager.Instance.GetDataAsset<RecipeDataAsset>();
|
||||||
|
if (recipeData.TryGetDataById(evt.RecipeId, out var recipeDataEntry))
|
||||||
|
{
|
||||||
|
var sprite = DataManager.Instance.GetSprite(recipeDataEntry.RecipeResult);
|
||||||
|
billItem.GetComponent<Image>().sprite = sprite;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user