2025-08-19 11:00:37 +00:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Opsive.BehaviorDesigner.Runtime;
|
2025-08-06 08:45:32 +00:00
|
|
|
using UnityEngine;
|
2025-08-19 11:00:37 +00:00
|
|
|
using UnityEngine.AddressableAssets;
|
2025-08-06 08:45:32 +00:00
|
|
|
|
|
|
|
namespace DDD
|
|
|
|
{
|
2025-08-21 07:40:49 +00:00
|
|
|
[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;
|
2025-08-21 07:40:49 +00:00
|
|
|
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;
|
2025-08-21 07:40:49 +00:00
|
|
|
restaurantCustomerAi.InitializeAi(_customerData);
|
2025-08-12 11:46:30 +00:00
|
|
|
|
2025-08-19 11:00:37 +00:00
|
|
|
// 스킨 설정
|
2025-08-13 03:56:52 +00:00
|
|
|
_spineController.SetSkin(_customerData.SpineSkinKey);
|
2025-08-12 11:46:30 +00:00
|
|
|
}
|
2025-08-06 08:45:32 +00:00
|
|
|
}
|
|
|
|
}
|