예제 #1
0
        private static void StartScripts(ScriptStartup start) // Change this, it doesn't allow for scripts to run in multiple scenes
        {
            foreach (var script in ActiveScripts)
            {
                script.Stop();
            }

            ActiveScripts.Clear();

            foreach (var pair in Scripts)
            {
                if (pair.Key.Start == start)
                {
                    var script = (IScript)Activator.CreateInstance(pair.Value);
                    ActiveScripts.Add(script);
                    script.Start();
                }
            }
        }
예제 #2
0
 public ScriptAttribute(ScriptStartup start)
 {
     Start = start;
 }