proceeder;             // A delegate that will simply call ProceedStepRoutine. It is a field so that Cancel and Cleanup can access it.

        public WaitForEvent(Type scriptEventType)
        {
            eventToWaitFor =
                (ScriptEventBase)scriptEventType         // TODO: make this into a utility method somewhere.
                .GetProperty("Instance", BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy)
                .GetValue(null);                         // TODO: add an ISingleton<maybe T> that we can then do GetInstance from instead of this.
        }
        public ScriptBlob(ScriptingLanguage scriptingLanguage, string code, ScriptEventBase executeOn = null)
        {
            language = scriptingLanguage;

            this.code = code;

            executeOn?.Subscribe((ScriptEventHandler)RunCode);

            this.executeOn = executeOn;
        }
Exemple #3
0
 // TODO: use in instead of ref?
 // TODO: add option to use ReflectionEquals as the equality comparator.
 public WaitForVariable(object toCheck, object toWaitFor, ScriptEventBase checkOn)
 {
     this.toCheck   = toCheck;
     this.toWaitFor = toWaitFor;
     eventToCheckOn = checkOn;
 }
 public WaitForEvent(ScriptEventBase scriptEvent)
 {
     eventToWaitFor = scriptEvent;
 }