Game.TriggerConditionType
Assembly: Assembly-CSharp.dll
Namespace: Game.Prefabs
Type: enum
Base: System.Enum (underlying type: System.Int32)
Summary:
Represents the comparison type used by trigger/predicate logic in prefabs — i.e., how a runtime value should be compared to a target/threshold for a trigger to fire (equals, greater than, or less than).
Fields
-
Equals
Represents an equality comparison. Underlying value = 0. -
GreaterThan
Represents a "greater than" comparison. Underlying value = 1. -
LessThan
Represents a "less than" comparison. Underlying value = 2.
Properties
- This enum defines no properties.
Constructors
- Enums do not define public constructors. Values are the named constants above with implicit integer values (Equals = 0, GreaterThan = 1, LessThan = 2).
Methods
- No methods are declared on this enum. Standard methods inherited from System.Enum / System.ValueType / System.Object are available (e.g., ToString(), HasFlag(), GetTypeCode()).
Usage Example
using UnityEngine;
using Game.Prefabs;
public static class TriggerUtils
{
public static bool CheckTrigger(float currentValue, float threshold, TriggerConditionType condition)
{
switch (condition)
{
case TriggerConditionType.Equals:
// Use approximate equality for floating-point comparisons.
return Mathf.Approximately(currentValue, threshold);
case TriggerConditionType.GreaterThan:
return currentValue > threshold;
case TriggerConditionType.LessThan:
return currentValue < threshold;
default:
return false;
}
}
}