Invoke Node
Description
[SchemeAttribute] ile işaretlenmiş IResult türünde ki bütün methodları çalıştırır.
using System.Linq;
using UnityEngine;
namespace Nullframes.Intrigues.Demo
{
public class Demo_Methods : MonoBehaviour
{
[Scheme("Conspirator Level Up")]
private IResult LevelUp(Scheme scheme) {
LevelComponent levelComponent = scheme.Conspirator.GetComponent<LevelComponent>(); // This is example component.
if (levelComponent != null) {
levelComponent.LevelUp();
return IResult.True;
}
return IResult.Null;
}
[Scheme("Conspirator Level > 5")]
private IResult LevelGreaterThanFive() {
LevelComponent levelComponent = scheme.Conspirator.GetComponent<LevelComponent>(); // This is example component.
if (levelComponent != null) {
levelComponent.LevelUp();
return IResult.True;
}
return IResult.Null;
}
}
}