ProjectDDD/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/Customer/CustomerCharacter.cs

29 lines
857 B
C#
Raw Normal View History

using System.Threading.Tasks;
using Opsive.BehaviorDesigner.Runtime;
2025-08-06 08:45:32 +00:00
using UnityEngine;
using UnityEngine.AddressableAssets;
2025-08-06 08:45:32 +00:00
namespace DDD
{
[RequireComponent(typeof(RestaurantCustomerAiComponent))]
2025-08-12 11:46:30 +00:00
public class CustomerCharacter : RestaurantNpcCharacter, ICustomerInitializer
2025-08-06 08:45:32 +00:00
{
2025-08-12 11:46:30 +00:00
private CustomerData _customerData;
protected IRestaurantCustomerAi restaurantCustomerAi;
protected override void Awake()
{
base.Awake();
restaurantCustomerAi = GetComponent<IRestaurantCustomerAi>();
}
public void Initialize(CustomerData customerData)
2025-08-12 11:46:30 +00:00
{
_customerData = customerData;
restaurantCustomerAi.InitializeAi(_customerData);
2025-08-12 11:46:30 +00:00
// 스킨 설정
_spineController.SetSkin(_customerData.SpineSkinKey);
2025-08-12 11:46:30 +00:00
}
2025-08-06 08:45:32 +00:00
}
}