This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
project-undercover/Project Undercover/Assets/Scripts/CharacterStateMachine/DecisionScripts/ObjectAlreadyHasInteractorDecision.cs

13 lines
400 B
C#
Raw Normal View History

2017-10-10 12:43:11 -05:00
using UnityEngine;
[CreateAssetMenu(menuName = "CharacterStateMachine/Decisions/ObjectAlreadyHasInteractor")]
public class ObjectAlreadyHasInteractorDecision : Decision
{
public override bool Decide(StateController controller)
{
if (controller.SelectedObject.Interactor != null)
return controller.SelectedObject.Interactor != controller;
return false;
}
}