/// <summary> /// Creates a new MpqConsole /// </summary> public MpqConsole(Game game, SpriteFont font) : base(game) { Console = new XnaConsoleComponent(game, font); game.Components.Add(Console); Console.Prompt(Prompt, Execute); }
/// <summary> /// Creates a new CssInterpreter /// </summary> public CssInterpreter(Game game, SpriteFont font) : base((Game)game) { multi = ""; console = new XnaConsoleComponent(game, font); game.Components.Add(console); console.Prompt(Prompt, Execute); }
/// <summary> /// Creates a new CssInterpreter /// </summary> public CssInterpreter(GameClient parentGame, SpriteFont font) : base((GameClient)parentGame) { multi = ""; game = parentGame; console = new XnaConsoleComponent(game, font); game.Components.Add(console); Prompt(); }
/// <summary> /// Creates a new PythonInterpreter /// </summary> public PythonInterpreter(Game1 game, SpriteFont font) : base((Game)game) { this.PythonEngine = new PythonEngine(); this.PythonOutput = new MemoryStream(); this.PythonEngine.SetStandardOutput(PythonOutput); this.ASCIIEncoder = new ASCIIEncoding(); ClrModule clr = this.PythonEngine.Import("clr") as ClrModule; clr.AddReference("Microsoft.Xna.Framework"); clr.AddReference("Microsoft.Xna.Framework.Game"); this.PythonEngine.Execute("from Microsoft.Xna.Framework import *"); this.PythonEngine.Execute("from Microsoft.Xna.Framework.Graphics import *"); this.PythonEngine.Execute("from Microsoft.Xna.Framework.Content import *"); multi = ""; Console = new XnaConsoleComponent(game, font); game.Components.Add(Console); Console.Prompt(Prompt, Execute); AddGlobal("Console", Console); }