Implements the functions availabe to C# scripts.
Inheritance: ScriptFunctionProxy
		/// <summary>
		/// A simple constructor that initializes the object with the given values.
		/// </summary>
		/// <param name="p_gmdGameMode">The game mode currently being managed.</param>
		/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
		/// <param name="p_csfFunctions">The proxy providing the implementations of the functions available to the C# script.</param>
		/// <param name="p_tpeBaseScriptType">The type of the base script from which all C# scripts should derive.</param>
		public CSharpScriptExecutor(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, CSharpScriptFunctionProxy p_csfFunctions, Type p_tpeBaseScriptType)
		{
			m_gmdGameMode = p_gmdGameMode;
			m_eifEnvironmentInfo = p_eifEnvironmentInfo;
			m_csfFunctions = p_csfFunctions;
			BaseScriptType = p_tpeBaseScriptType;
		}
 /// <summary>
 /// A simple constructor that initializes the object with the given values.
 /// </summary>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_csfFunctions">The proxy providing the implementations of the functions available to the C# script.</param>
 /// <param name="p_tpeBaseScriptType">The type of the base script from which all C# scripts should derive.</param>
 public CSharpScriptExecutor(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, CSharpScriptFunctionProxy p_csfFunctions, Type p_tpeBaseScriptType)
 {
     m_gmdGameMode        = p_gmdGameMode;
     m_eifEnvironmentInfo = p_eifEnvironmentInfo;
     m_csfFunctions       = p_csfFunctions;
     BaseScriptType       = p_tpeBaseScriptType;
 }
Exemple #3
0
 /// <summary>
 /// A simple constructor that initializes the object with the given values.
 /// </summary>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_csfFunctions">The proxy providing the implementations of the functions available to the C# script.</param>
 /// <param name="p_tpeBaseScriptType">The type of the base script from which all C# scripts should derive.</param>
 /// <param name="p_strVirtualActivatorFolder">The virtual mod activator's folder.</param>
 public CSharpScriptExecutor(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, CSharpScriptFunctionProxy p_csfFunctions, Type p_tpeBaseScriptType, string p_strVirtualActivatorFolder)
 {
     m_gmdGameMode             = p_gmdGameMode;
     m_eifEnvironmentInfo      = p_eifEnvironmentInfo;
     m_csfFunctions            = p_csfFunctions;
     BaseScriptType            = p_tpeBaseScriptType;
     m_strVirtualActivatorPath = p_strVirtualActivatorFolder;
 }
		/// <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="p_modMod">The mod being installed.</param>
        /// <param name="p_gmdGameMode">The game mode currently bieng managed.</param>
        /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
        /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
        /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
        /// <returns>An executor that can run the script type.</returns>
        public IScriptExecutor CreateExecutor(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IVirtualModActivator p_ivaVirtualModActivator, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
        {
            CSharpScriptFunctionProxy csfFunctions = GetScriptFunctionProxy(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_ivaVirtualModActivator, p_igpInstallers, p_scxUIContext);

            return(new CSharpScriptExecutor(p_gmdGameMode, p_eifEnvironmentInfo, csfFunctions, BaseScriptType, p_ivaVirtualModActivator.VirtualPath));
        }
 /// <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;
 }
Exemple #7
0
 /// <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;
 }