Inheritance: MonoBehaviour
示例#1
0
文件: Olo.cs 项目: tommadness/OpenKh
        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);
        }
示例#2
0
 protected override void OnEnable()
 {
     base.OnEnable();
     _trigger = target as TriggerBehavior;
 }
示例#3
0
 /*
  * 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);