コード例 #1
0
        private void Execute(string csScriptName)
        {
            var script1 = Path.Combine(_instance.GameInstanceConfiguration.StorageDataPath, "CsScript", csScriptName).LoadTextFile();

            Host         = new HostApp();
            scriptObject = CSScript.LoadCode(script1)
                           .CreateObject("*")
                           .AlignToInterface <IGameScriptVpObject>();

            scriptObject.GameVpObject = _vpObject;
            scriptObject.GameInstance = _instance;
            scriptObject.Initialize();
        }
コード例 #2
0
        void _fsw_Changed(object sender, FileSystemEventArgs e)
        {
            if (e.ChangeType == WatcherChangeTypes.Changed)
            {
                _fsw.EnableRaisingEvents = false;
                try
                {
                    _instance.Say("changed");
                }

                finally
                {
                    _fsw.EnableRaisingEvents = true;
                }
                scriptObject.Unload();

                scriptObject = null;
                Host         = null;
                Execute(_csScriptName);
            }
        }