/// <summary>
 /// Sets up the script.
 /// </summary>
 /// <remarks>
 /// This method sets the <see cref="CSharpScriptFunctionProxy"/> this script will use
 /// to perform its work.
 /// </remarks>
 /// <param name="p_csfFunctions">The object that implements the script functions.</param>
 public static void Setup(CSharpScriptFunctionProxy p_csfFunctions)
 {
     Functions = p_csfFunctions;
 }
 /// <summary>
 /// A simple constructor that initializes the object with the given values.
 /// </summary>
 public CSharpScriptExecutor(CSharpScriptFunctionProxy p_csfFunctions, Type p_typBaseScriptType)
 {
     m_csfFunctions = p_csfFunctions;
     BaseScriptType = p_typBaseScriptType;
 }
Пример #3
0
 /// <summary>
 /// A simple construtor that initializes the object with the given dependencies.
 /// </summary>
 /// <param name="p_csfFunctions">The object that implements the script functions.</param>
 public ScriptRunner(CSharpScriptFunctionProxy p_csfFunctions)
 {
     m_csfFunctions = p_csfFunctions;
 }
        /// <summary>
        /// Creates an executor that can run the script type.
        /// </summary>
        /// <param name="modArchive">The mod being installed.</param>
        /// <param name="delegates">delegates for communicating with the application core.</param>
        /// <returns>An executor that can run the script type.</returns>
        public IScriptExecutor CreateExecutor(Mod modArchive, CoreDelegates delegates)
        {
            CSharpScriptFunctionProxy csfFunctions = GetScriptFunctionProxy(modArchive, delegates);

            return(new CSharpScriptExecutor(csfFunctions, BaseScriptType));
        }