Merge pull request 'feature/namespace_restaurant' (#27) from feature/namespace_restaurant into develop

Reviewed-on: #27
This commit is contained in:
Jeonghyeon 2025-08-27 08:06:55 +00:00
commit 17ea4c85dc
424 changed files with 293 additions and 297 deletions

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c82c9604b41d4755b70d679f3a0a3947
timeCreated: 1756279729

View File

@ -18,13 +18,6 @@ public static class GameEvents
public static InventoryChangedEvent InventoryChangedEvent = new();
public static SmartVariablesDirtyEvent SmartVariablesDirtyEvent = new();
}
public static class RestaurantEvents
{
public static ItemSlotSelectedEvent ItemSlotSelectedEvent = new();
public static TodayMenuAddedEvent TodayMenuAddedEvent = new();
public static TodayMenuRemovedEvent TodayMenuRemovedEvent = new();
}
// public static class VoyageEvents
// {
@ -105,20 +98,4 @@ public class SmartVariablesDirtyEvent : IEvent
{
public SmartVariablesDomain DomainFlags;
}
#region RestaurantInteractionEvents
public class ItemSlotSelectedEvent : IEvent
{
public ItemModel Model;
}
public class TodayMenuAddedEvent : IEvent {}
public class TodayMenuRemovedEvent : IEvent
{
public InventoryCategoryType InventoryCategoryType;
}
#endregion
}

View File

@ -41,7 +41,7 @@ public interface IInteractable
{
bool CanInteract();
bool IsInteractionHidden();
bool OnInteracted(IInteractor interactor, ScriptableObject causerPayload = null);
void OnInteracted(IInteractor interactor, ScriptableObject causerPayload = null);
InteractionType GetInteractionType();
GameObject GetInteractableGameObject();
void InitializeInteraction(InteractionType interactionType);

View File

@ -39,7 +39,7 @@ public static void Broadcast<T>(T evt) where T : IEvent
{
foreach (var handler in list.Cast<IEventHandler<T>>())
{
handler.Invoke(evt);
handler.HandleEvent(evt);
}
}
}

View File

@ -2,6 +2,6 @@ namespace DDD
{
public interface IEventHandler<in T> where T : IEvent
{
void Invoke(T evt);
void HandleEvent(T evt);
}
}

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DDD.Restaurant;
using UnityEngine;
using UnityEngine.Localization.SmartFormat.PersistentVariables;
@ -71,7 +72,7 @@ public void PostInit()
EventBus.Register<SmartVariablesDirtyEvent>(this);
}
public void Invoke(SmartVariablesDirtyEvent evt)
public void HandleEvent(SmartVariablesDirtyEvent evt)
{
var flags = evt.DomainFlags;
if (flags == SmartVariablesDomain.All)

View File

@ -68,7 +68,7 @@ private void UpdateTimeScale()
public bool IsPaused => Mathf.Approximately(CurrentTimeScale, 0f);
public void Invoke(TimeScaleChangeEvent evt)
public void HandleEvent(TimeScaleChangeEvent evt)
{
if (evt.NewTimeScale < 1f)
{

Some files were not shown because too many files have changed in this diff Show More