private bool registerMacro(String macro, String name, IScriptCompiler scriptCompiler, IMacroService macroService, XmlScriptExecutor executor) { ScriptedMacro scriptedMacro = new ScriptedMacro(executor); scriptedMacro.Name = name; scriptedMacro.Script = scriptCompiler.Compile(macro, name); return macroService.registerMacro(new XnaScrapId(name), scriptedMacro); }
public TestGame(int processId = 0, string window = "") { //graphics = new GraphicsDeviceManager(this); //graphics.PreferredDepthStencilFormat = DepthFormat.Depth24; //graphics.ApplyChanges(); Content.RootDirectory = "Content"; // Frame rate is 30 fps by default for Windows Phone. TargetElapsedTime = TimeSpan.FromTicks(333333); m_core = new Core(this); m_scriptExecutor = XmlScriptExecutor.GetInstance(this); m_scriptCompiler = new XmlScriptCompilerService(this); m_collisionManager = new CollisionManager(this); m_sceneManager = new SceneManager(this); m_inputManager = new InputManager(this); m_animationService = new AnimationService(this); // graphics should be inserted last, as they should be updated at the end of a frame //RenderManager.TargetWindow target = new RenderManager.TargetWindow(); //target.ProcessId = processId; //target.ChildWndCaption = window; //m_renderManager = new RenderManager(this, graphics, target); m_renderManager = new RenderManager(this, graphics); #if WINDOWS m_netCtrl = new NetCtrlService(this); #endif }
public ScriptedMacro(XmlScriptExecutor scriptExecutor) { m_scriptExecutor = scriptExecutor; }
public ScriptedMacro(XmlScriptExecutor scriptExecutor, IScript script) { m_scriptExecutor = scriptExecutor; m_script = script; }
/// <summary> /// I know singelton is odd... /// </summary> /// <returns></returns> public static XmlScriptExecutor GetInstance(Game game) { if (m_instance == null) { m_instance = new XmlScriptExecutor(game); } return m_instance; }