21 lines
561 B
C#
21 lines
561 B
C#
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Bridge class that wraps ItemBehavior for use with PlayerActionHandler.
|
|
/// This allows the new behavior system to work with the existing action handler.
|
|
/// </summary>
|
|
[CreateAssetMenu(menuName = "Actions/Behavior Action")]
|
|
public class BehaviorActionData : PlayerActionData
|
|
{
|
|
[HideInInspector]
|
|
public ItemBehavior behavior;
|
|
|
|
public override void ExecuteEffect(GameObject performer, GameObject target)
|
|
{
|
|
if (behavior != null)
|
|
{
|
|
behavior.Use(performer, target);
|
|
}
|
|
}
|
|
}
|