Invoke Node: Difference between revisions
Tayfunwiki (talk | contribs) No edit summary |
Tayfunwiki (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<b>Description</b><div class="description" style="padding-left:35px;">['''SchemeAttribute'''] ile işaretlenmiş IResult türünde ki bütün methodları çalıştırır. </div> | |||
[[File:Invoke-1.gif|thumb|Invoke Node]] | [[File:Invoke-1.gif|thumb|Invoke Node]] | ||
[[File:Invoke-2.gif|thumb|Invoke Node]] | [[File:Invoke-2.gif|thumb|Invoke Node]] | ||
<syntaxhighlight lang="c#" line="1" start="1"> | |||
using System.Linq; | using System.Linq; | ||
using UnityEngine; | using UnityEngine; |
Revision as of 19:27, 14 December 2023
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;
}
}
}