Esempio n. 1
0
 public void Execute()
 {
     if (!context.IsDisposed)
     {
         try
         {
             gameInstance.ExecuteCallback(this, jsFunction, false);
         }
         catch (Exception ex)
         {
             gameInstance.LogError(ex);
         }
     }
 }
Esempio n. 2
0
        public void include(string file)
        {
            var fullFilename = Path.GetDirectoryName(game.Parent.EntryFile).CombinePath(file.ToSafePath()).ToFullPath();

            if (!File.Exists(fullFilename))
            {
                throw new FileNotFoundException("File '{0}' was not found.".FormatString(file));
            }

            try
            {
                game.AddIncludedFile(fullFilename);
                game.LoadFile(fullFilename);
            }
            catch (Exception ex)
            {
                game.LogError(ex, file);
                throw;
            }
        }