ACR_Wealth.ACR_Wealth.LoadScriptGlobals C# (CSharp) Method

LoadScriptGlobals() public method

This routine is invoked when the script context was restored from the interopability script stack for a script situation. Its purpose is to restore any 'global' (i.e. member variable) state that was passed to the initial StoreState request. The globals may only include standard NWScript types (Int32, UInt32, Single, and engine structures).
public LoadScriptGlobals ( [ Globals ) : void
Globals [ Supplies an array of global variables that /// were provided to the initial StoreState request.
return void
        public void LoadScriptGlobals([In] object[] Globals)
        {
            //
            // Restore all [NWScriptGlobal] attributed globals from the global
            // list.
            //

            int i = 0;

            foreach (FieldInfo Field in GlobalFields)
            {
                Field.SetValue(this, Globals[i]);
                i += 1;
            }
        }
    }