You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1010 B
C#
33 lines
1010 B
C#
using MalbersAnimations.Controller;
|
|
using MalbersAnimations.Scriptables;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace MalbersAnimations.Conditions
|
|
{
|
|
[System.Serializable]
|
|
public class C_Integer : MCondition
|
|
{
|
|
public override string DisplayName => "Values/Integer";
|
|
|
|
public IntReference Target;
|
|
public ComparerInt Condition;
|
|
public IntReference Value;
|
|
|
|
public void SetTarget(int targ) => Target.Value = targ;
|
|
public void SetValue(int targ) => Value.Value = targ;
|
|
|
|
public void SetTarget(IntVar targ) => Target.Value = targ.Value;
|
|
public void SetValue(IntVar targ) => Value.Value = targ.Value;
|
|
|
|
public override bool _Evaluate() => Target.Value.CompareInt(Value.Value, Condition);
|
|
|
|
public override void SetTarget(Object target)
|
|
{
|
|
if (target is IntVar) this.Target.Value = target as IntVar;
|
|
}
|
|
|
|
private void Reset() => Name = "New Integer Comparer";
|
|
}
|
|
}
|