Beispiel #1
0
        private void DoTriggeringImpl(CTriggerMatch match, PoolObjHandle <ActorRoot> src, PoolObjHandle <ActorRoot> atker)
        {
            ListView <TriggerActionBase> values = this.TriggerActionMultiMap.GetValues((uint)match.ActType, true);

            for (int i = 0; i < values.get_Count(); i++)
            {
                TriggerActionBase triggerActionBase = values.get_Item(i);
                if (triggerActionBase != null)
                {
                    triggerActionBase.AppendRefObj(match.Listeners);
                    triggerActionBase.TriggerEnter(src, atker, this);
                }
            }
            if (match.ActionList != null && match.ActionList.Length > 0)
            {
                int num = match.ActionList.Length;
                for (int j = 0; j < num; j++)
                {
                    TriggerActionWrapper triggerActionWrapper = match.ActionList[j];
                    if (triggerActionWrapper != null)
                    {
                        TriggerActionBase actionInternal = triggerActionWrapper.GetActionInternal();
                        if (actionInternal == null)
                        {
                            triggerActionWrapper.Init(0);
                            actionInternal = triggerActionWrapper.GetActionInternal();
                            DebugHelper.Assert(actionInternal != null);
                        }
                        actionInternal.AppendRefObj(match.Listeners);
                        actionInternal.TriggerEnter(src, atker, this);
                    }
                }
            }
        }
Beispiel #2
0
 private void DoTriggeringImpl(CTriggerMatch match, PoolObjHandle<ActorRoot> src, PoolObjHandle<ActorRoot> atker, object param)
 {
     ListView<TriggerActionBase> values = this.TriggerActionMultiMap.GetValues((uint) match.ActType, true);
     for (int i = 0; i < values.Count; i++)
     {
         TriggerActionBase base2 = values[i];
         if (base2 != null)
         {
             base2.AppendRefObj(match.Listeners);
             base2.TriggerEnter(src, atker, this, param);
         }
     }
     if ((match.ActionList != null) && (match.ActionList.Length > 0))
     {
         int length = match.ActionList.Length;
         for (int j = 0; j < length; j++)
         {
             TriggerActionWrapper wrapper = match.ActionList[j];
             if (wrapper != null)
             {
                 TriggerActionBase actionInternal = wrapper.GetActionInternal();
                 if (actionInternal == null)
                 {
                     wrapper.Init();
                     actionInternal = wrapper.GetActionInternal();
                     DebugHelper.Assert(actionInternal != null);
                 }
                 actionInternal.AppendRefObj(match.Listeners);
                 actionInternal.TriggerEnter(src, atker, this, param);
             }
         }
     }
 }