23 lines
644 B
C#
23 lines
644 B
C#
using UnityEngine;
|
|
|
|
namespace CustomComponent
|
|
{
|
|
[CreateAssetMenu(menuName = "Story/Directive/Change Background", fileName = "Directive_ChangeBackground")]
|
|
public sealed class StoryChangeBackgroundDirectiveAsset : StoryDirectiveAsset
|
|
{
|
|
[SerializeField] private string _backgroundAssetName = string.Empty;
|
|
|
|
public override string ActionName => "ChangeBackground";
|
|
|
|
public override void Execute(StoryDirectorComponent director)
|
|
{
|
|
if (director == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
director.ExecuteChangeBackground(_backgroundAssetName);
|
|
}
|
|
}
|
|
}
|