Example #1
0
        public virtual void Action(IList <ArgValue> funcArgs, IEventArgs args)
        {
            long s = FreeTimeDebug.RecordStart("call " + name + "(" + key + ")");

            FreeLog.CallFunc("call " + name + "(" + key + "):");
            if (funcArgs != null)
            {
                foreach (FuncArg arg in this.args)
                {
                    SetArg(arg, funcArgs, args);
                }
            }
            if (action != null)
            {
                action.Act(args);
            }
            if (funcArgs != null)
            {
                foreach (FuncArg arg in this.args)
                {
                    RemoveArg(arg, args);
                }
            }
            FreeTimeDebug.RecordEnd("call " + name + "(" + key + ")", s);
        }
Example #2
0
 public virtual void Trigger(IEventArgs args)
 {
     if (!disable)
     {
         FreeLog.SetTrigger(this);
         FreeLog.ActionMark = this.@group + " " + this.name + " " + this.key;
         long s = FreeTimeDebug.RecordStart("trigger " + name);
         foreach (IGameAction de in actions)
         {
             de.Act(args);
         }
         FreeTimeDebug.RecordEnd("trigger " + name, s);
     }
 }