DDD-56 인터랙션 인터페이스 추가
This commit is contained in:
parent
ad17db114f
commit
36cef3e169
@ -1,19 +1,23 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public static class GameEvents
|
||||
{
|
||||
// public static GameGlobalEvent GameGlobalEvent = new GameGlobalEvent();
|
||||
public static InteractionEvent Interaction = new InteractionEvent();
|
||||
}
|
||||
public static class RestaurantEvents
|
||||
{
|
||||
|
||||
// Some events...
|
||||
}
|
||||
public static class VoyageEvents
|
||||
{
|
||||
|
||||
// Some events...
|
||||
}
|
||||
|
||||
// public class GameGlobalEvent : IEvent
|
||||
// {
|
||||
// }
|
||||
}
|
||||
public class InteractionEvent : IEvent
|
||||
{
|
||||
public GameObject Causer;
|
||||
public GameObject Target;
|
||||
}
|
||||
}
|
||||
|
19
Assets/_DDD/_Scripts/GameEvent/IInteractable.cs
Normal file
19
Assets/_DDD/_Scripts/GameEvent/IInteractable.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public enum InteractionType
|
||||
{
|
||||
Default
|
||||
}
|
||||
public interface IInteractable
|
||||
{
|
||||
bool CanInteract();
|
||||
void OnInteracted(IInteractor interactor);
|
||||
}
|
||||
public interface IInteractor
|
||||
{
|
||||
void TryInteract(InteractionType interactionType);
|
||||
}
|
||||
}
|
3
Assets/_DDD/_Scripts/GameEvent/IInteractable.cs.meta
Normal file
3
Assets/_DDD/_Scripts/GameEvent/IInteractable.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c48ae2ea4843400db1de4d513313073b
|
||||
timeCreated: 1752741040
|
@ -1,9 +1,9 @@
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class RestaurantCharacter : MonoBehaviour, IGameCharacter
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user