27 lines
702 B
C#
27 lines
702 B
C#
using System;
|
||
using System.Collections;
|
||
using UnityEngine;
|
||
|
||
namespace RR.Common.Behaviour
|
||
{
|
||
/// <summary>
|
||
/// Действие добавления сообщения с иконкой говорящего.
|
||
/// </summary>
|
||
[Serializable]
|
||
public class AddMessageAction : SequenceAction
|
||
{
|
||
[SerializeField] public string text;
|
||
[SerializeField] public Sprite speakerIcon;
|
||
|
||
public override IEnumerator Execute(Sequencer context, GameObject targetGO)
|
||
{
|
||
if (context is MessageController messageController)
|
||
{
|
||
messageController.Add(speakerIcon, text);
|
||
}
|
||
yield return null;
|
||
}
|
||
}
|
||
}
|
||
|