public static TriggerBehavior GetTriggerBehavior(uint value) { TriggerBehavior behavior = new TriggerBehavior(); behavior.Type = (TriggerType)BitsUtil.Int.GetBits((int)value, 0, 4); behavior.Shape = (TriggerShape)BitsUtil.Int.GetBits((int)value, 4, 4); behavior.Fire = BitsUtil.Int.GetBit((int)value, 8); behavior.Stop = BitsUtil.Int.GetBit((int)value, 9); return(behavior); }
protected override void OnEnable() { base.OnEnable(); _trigger = target as TriggerBehavior; }
/* * Activates a trigger behavior on the target specified by the TriggerObject. * Returns true if the trigger type is valid for the target object; false if not. */ public abstract void Trigger(TriggerBehavior triggerType);