31 lines
664 B
C#
31 lines
664 B
C#
![]() |
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using BITKit;
|
||
|
using Net.BITKit.UX.SnackBar;
|
||
|
using NodeCanvas.Framework;
|
||
|
using ParadoxNotion.Design;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace Net.Project.B.NodeCanvas
|
||
|
{
|
||
|
public class SnackBarTask : ActionTask
|
||
|
{
|
||
|
[RequiredField]
|
||
|
[TextAreaField(4)]
|
||
|
public BBParameter<string> Text;
|
||
|
|
||
|
protected override void OnExecute()
|
||
|
{
|
||
|
if (BITApp.ServiceProvider.QueryComponents(out ISnackBar snackBar) is false)
|
||
|
{
|
||
|
EndAction(false);
|
||
|
}
|
||
|
|
||
|
snackBar.Add(Text.value);
|
||
|
|
||
|
EndAction(true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|