로그 추가
This commit is contained in:
parent
b57cc45902
commit
bfcc99be38
@ -1210,9 +1210,6 @@ PrefabInstance:
|
|||||||
- targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: 3825874317044733320}
|
addedObject: {fileID: 3825874317044733320}
|
||||||
- targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3}
|
|
||||||
insertIndex: -1
|
|
||||||
addedObject: {fileID: 1122074513716966771}
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3}
|
||||||
--- !u!1 &4266090516809920735 stripped
|
--- !u!1 &4266090516809920735 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
@ -1255,23 +1252,3 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: af69e82818254bfa9cabb2dbf9430850, type: 3}
|
m_Script: {fileID: 11500000, guid: af69e82818254bfa9cabb2dbf9430850, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
--- !u!114 &1122074513716966771
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4266090516809920735}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 201f9e6d7ca7404baa9945950292a392, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
_interactionType: 4
|
|
||||||
_executionParameters:
|
|
||||||
_holdTime: 0
|
|
||||||
_displayParameters:
|
|
||||||
_messageKey:
|
|
||||||
_interactionAvailableFlows: 2
|
|
||||||
_aiInteractionPoints: []
|
|
||||||
autoInitialize: 1
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using Opsive.BehaviorDesigner.Runtime.Tasks;
|
using Opsive.BehaviorDesigner.Runtime.Tasks;
|
||||||
using Opsive.BehaviorDesigner.Runtime.Tasks.Actions;
|
using Opsive.BehaviorDesigner.Runtime.Tasks.Actions;
|
||||||
|
using Opsive.BehaviorDesigner.Runtime.Tasks.Events;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace DDD
|
namespace DDD
|
||||||
@ -29,6 +30,7 @@ public class MoveToInteractionTarget : Action
|
|||||||
|
|
||||||
public override void OnStart()
|
public override void OnStart()
|
||||||
{
|
{
|
||||||
|
Debug.Log($"[{gameObject.GetHashCode()}, {GetType().Name}] OnStart");
|
||||||
if (cachedTarget != null) return;
|
if (cachedTarget != null) return;
|
||||||
movement = gameObject.GetComponentInParent<IAiMovement>();
|
movement = gameObject.GetComponentInParent<IAiMovement>();
|
||||||
repathTimer = 0f;
|
repathTimer = 0f;
|
||||||
@ -44,7 +46,6 @@ public override TaskStatus OnUpdate()
|
|||||||
var target = GetTarget();
|
var target = GetTarget();
|
||||||
if (target == null)
|
if (target == null)
|
||||||
return failIfNoTarget ? TaskStatus.Failure : TaskStatus.Success;
|
return failIfNoTarget ? TaskStatus.Failure : TaskStatus.Success;
|
||||||
Debug.Log(target.name);
|
|
||||||
|
|
||||||
if (ShouldUpdateDestination())
|
if (ShouldUpdateDestination())
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ public void Execute(ref DynamicBuffer<BranchComponent> branchComponents,
|
|||||||
branchComponents[taskComponent.BranchIndex] = branchComponent;
|
branchComponents[taskComponent.BranchIndex] = branchComponent;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (taskComponent.Status != TaskStatus.Running)
|
if (taskComponent.Status != TaskStatus.Running)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ public class StartRestaurantOrder : Action
|
|||||||
public override void OnStart()
|
public override void OnStart()
|
||||||
{
|
{
|
||||||
_isGetInteractor = gameObject.TryGetComponent(out _interactor);
|
_isGetInteractor = gameObject.TryGetComponent(out _interactor);
|
||||||
|
|
||||||
if (!_isGetInteractor)
|
if (!_isGetInteractor)
|
||||||
Debug.LogError($"[{GetType().Name}] IInteractor를 찾을 수 없습니다: {gameObject.name}");
|
Debug.LogError($"[{GetType().Name}] IInteractor를 찾을 수 없습니다: {gameObject.name}");
|
||||||
}
|
}
|
||||||
|
@ -17,55 +17,27 @@ public class WaitForPlayerInteraction : Action
|
|||||||
public override void OnStart()
|
public override void OnStart()
|
||||||
{
|
{
|
||||||
// 의자가 복합 상태를 가지게 될 경우
|
// 의자가 복합 상태를 가지게 될 경우
|
||||||
// GameObject interactionTarget = null;
|
GameObject interactionTarget = null;
|
||||||
// var shared = gameObject.GetComponentInChildren<IAISharedBlackboard>();
|
var shared = gameObject.GetComponentInChildren<IAISharedBlackboard>();
|
||||||
// if (shared != null)
|
if (shared != null)
|
||||||
// {
|
{
|
||||||
// interactionTarget = shared.GetCurrentInteractionTarget();
|
interactionTarget = shared.GetCurrentInteractionTarget();
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// // 하위 호환: 고객 전용 블랙보드 지원
|
// 하위 호환: 고객 전용 블랙보드 지원
|
||||||
// var customerBb = gameObject.GetComponentInParent<IRestaurantCustomerBlackboard>();
|
var customerBb = gameObject.GetComponentInParent<IRestaurantCustomerBlackboard>();
|
||||||
// interactionTarget = customerBb?.GetCurrentInteractionTarget();
|
interactionTarget = customerBb?.GetCurrentInteractionTarget();
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// if (interactionTarget == null)
|
|
||||||
// {
|
|
||||||
// Debug.LogError($"[{GetType().Name}] interactionTarget을 찾을 수 없습니다: {gameObject.name}");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (!interactionTarget.TryGetComponent<RestaurantInteractionComponent>(out var interactionComponent))
|
|
||||||
// Debug.LogError($"[{interactionTarget.name}] {nameof(interactionComponent)}를 찾을 수 없습니다: {gameObject.name}");
|
|
||||||
// if (interactionComponent is IInteractionSubsystemOwner subsystemOwner)
|
|
||||||
// {
|
|
||||||
// if (!subsystemOwner.TryGetSubsystemObject<RestaurantMealType>(out var subsystem))
|
|
||||||
// {
|
|
||||||
// Debug.LogError($"[{GetType().Name}] {nameof(_targetOrderType)}의 Subsystem을 찾을 수 없습니다: {gameObject.name}");
|
|
||||||
// _isGetInteractionSubsystem = false;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// _isGetInteractionSubsystem = true;
|
|
||||||
// subsystem.SetInteractionSubsystemType(_targetOrderType);
|
|
||||||
//
|
|
||||||
// if (!gameObject.TryGetComponent<IInteractor>(out var interactor))
|
|
||||||
// {
|
|
||||||
// Debug.LogError($"[{GetType().Name}] IInteractor를 찾을 수 없습니다: {gameObject.name}");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// interactor.CanInteractTo(interactionComponent);
|
|
||||||
//
|
|
||||||
// _interactionSubsystem = subsystem;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (!gameObject.TryGetComponent<RestaurantInteractionComponent>(out var interactionComponent))
|
if (interactionTarget == null)
|
||||||
{
|
{
|
||||||
Debug.LogError($"[{GetType().Name}]에서 interactionComponent를 찾을 수 없습니다: {gameObject.name}");
|
Debug.LogError($"[{GetType().Name}] interactionTarget을 찾을 수 없습니다: {gameObject.name}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!interactionTarget.TryGetComponent<RestaurantInteractionComponent>(out var interactionComponent))
|
||||||
|
Debug.LogError($"[{interactionTarget.name}] {nameof(interactionComponent)}를 찾을 수 없습니다: {gameObject.name}");
|
||||||
|
|
||||||
if (interactionComponent is not IInteractionSubsystemOwner subsystemOwner)
|
if (interactionComponent is not IInteractionSubsystemOwner subsystemOwner)
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,7 @@ public void SetCurrentInteractionTarget(GameObject targetGameObject)
|
|||||||
_currentInteractionTarget = targetGameObject;
|
_currentInteractionTarget = targetGameObject;
|
||||||
if (_subtree == null) return;
|
if (_subtree == null) return;
|
||||||
_subtree.SetVariableValue(nameof(RestaurantCustomerBlackboardKey.CurrentInteractionTarget), targetGameObject);
|
_subtree.SetVariableValue(nameof(RestaurantCustomerBlackboardKey.CurrentInteractionTarget), targetGameObject);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameObject GetCurrentInteractionTarget()
|
public GameObject GetCurrentInteractionTarget()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Unity.VisualScripting;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace DDD
|
namespace DDD
|
||||||
@ -23,11 +24,13 @@ public RestaurantMealType GetInteractionSubsystemType()
|
|||||||
|
|
||||||
public void SetInteractionSubsystemType(RestaurantMealType inValue)
|
public void SetInteractionSubsystemType(RestaurantMealType inValue)
|
||||||
{
|
{
|
||||||
|
Debug.Log($"[{gameObject.GetHashCode()}, {GetType().Name}] SetInteractionSubsystemType {inValue.ToString()}");
|
||||||
_currentRestaurantMealType = inValue;
|
_currentRestaurantMealType = inValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InitializeSubsystem()
|
public void InitializeSubsystem()
|
||||||
{
|
{
|
||||||
|
Debug.Log($"[{gameObject.GetHashCode()}, {GetType().Name}] InitializeSubsystem");
|
||||||
_currentRestaurantMealType = RestaurantMealType.None;
|
_currentRestaurantMealType = RestaurantMealType.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,6 +41,7 @@ public bool CanInteract()
|
|||||||
|
|
||||||
public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null)
|
public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null)
|
||||||
{
|
{
|
||||||
|
Debug.Log($"[{gameObject.GetHashCode()}, {GetType().Name}] OnInteracted");
|
||||||
var prev = _currentRestaurantMealType;
|
var prev = _currentRestaurantMealType;
|
||||||
_currentRestaurantMealType = GetNextState(prev);
|
_currentRestaurantMealType = GetNextState(prev);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user