Example #1
0
 public static void InitializeLevel()
 {
     // load scripts
     try
     {
         ScriptProcessor.ClearScripts();
         ScriptLoader.InitializeLevel();
     }
     catch (Exception ex)
     {
         Log.Write(LogLevel.Critical, ex.ToString());
         Environment.Exit(0);
     }
 }
Example #2
0
        public static void Initialize()
        {
            Log.Initialize(LogLevel.All);
            Log.AddListener(new FileLogListener("InfinityScript.log", false));
            Log.AddListener(new TraceLogListener());
            Log.AddListener(new GameLogListener());

            try
            {
                ScriptLoader.Initialize();
            }
            catch (Exception ex)
            {
                Log.Write(LogLevel.Critical, ex.ToString());
                Environment.Exit(0);
            }
        }
Example #3
0
        public static void Initialize()
        {
            // initialize logging
            Log.Initialize(LogLevel.All);
            Log.AddListener(new FileLogListener("InfinityScript.log", false));
            Log.AddListener(new TraceLogListener());
            Log.AddListener(new GameLogListener());

            // load scripts
            try
            {
                Entity.InitializeMappings();
                ScriptNames.Initialize();
                ScriptLoader.Initialize();
            }
            catch (Exception ex)
            {
                Log.Write(LogLevel.Critical, ex.ToString());
                Environment.Exit(0);
            }

            //GameInterface.TempFunc();
            //Environment.Exit(0);
        }
Example #4
0
 public static void LoadScript(string scriptName)
 {
     ScriptLoader.LoadAssemblies("scripts", scriptName);
 }