Beispiel #1
0
        public void Execute(IDictionary <string, object> context)
        {
            var items = GetItems(context);
            int index = 0;

            foreach (var itm in items)
            {
                if (ItemIndexKey != null)
                {
                    context[ItemIndexKey] = index;
                }

                context[ItemKey] = itm;
                ItemAction.Execute(context);

                index++;
            }
        }
Beispiel #2
0
 /// <summary>
 /// A use function for the item. Required for front-end behavior.
 /// </summary>
 /// <param name="obj">Object to perform the action on.</param>
 /// <returns>True if successful, False otherwise.</returns>
 public bool Use(GameObject obj)
 {
     return(action.Execute(obj));
 }