private void RecordTrigger(ITriggerCreatorParam param, int eventID, Callback <ITriggerDoActionParam> fun_action, List <TriggerCondition <ITriggerDoActionParam> > conditions = null)
 {
     if (param != null)
     {
         param.EventID         = eventID;
         param.TriggerID       = TriggerManager2.assign_trigger_id();
         param.Func_actions    = fun_action;
         param.Func_conditions = conditions;
         TriggerEvent2 triggerEvent = TriggerManager2.CreateTriggerEvent2(param);
         this.listTrigger2.Add(triggerEvent);
         TriggerManager2.Instance.AddListener(triggerEvent);
     }
 }
예제 #2
0
        private void RegisterEvent()
        {
            TriggerEvent2 triggerEvent = TriggerManager2.CreateTriggerEvent2(new TriggerCreateParam_touchController
            {
                EventID         = 1,
                TriggerID       = TriggerManager2.assign_trigger_id(),
                Func_actions    = new Callback <ITriggerDoActionParam>(this.OnStopOrStart),
                Func_conditions = null
            });

            TriggerManager2.Instance.AddListener(triggerEvent);
            this.listTrigger.Add(triggerEvent);
        }