Example #1
0
 public ReturnEventArg(ReturnEventData data)
 {
     trigger    = data.args.trigger;
     callback   = data.args.callback;
     isCallback = data.args.isCallback;
     target     = data.args.target;
     global     = data.args.global;
     arguments  = data.args.arguments;
     name       = data.args.name;
 }
Example #2
0
        /// <summary>
        /// Sets up the arguments for the Return Event, and triggers it upon entering the unit.
        /// </summary>
        public ControlOutput Enter(Flow flow)
        {
            List <object> argumentList = new List <object>();
            var           eventData    = new ReturnEventData(new ReturnEventArg(this, global ? (GameObject)null : flow.GetValue <GameObject>(target), flow.GetValue <string>(name), global, argumentList.ToArray()));

            argumentList.Add(eventData);
            argumentList.AddRange(arguments.Select(new System.Func <ValueInput, object>(flow.GetConvertedValue)));
            ReturnEvent.Trigger(this, global ? (GameObject)null : flow.GetValue <GameObject>(target), flow.GetValue <string>(name), global, argumentList.ToArray());

            return(exit);
        }