public KeyboardInputLayer(Scene scene, Torch.Object parent) : base(scene, parent) { var keyboard = ((InputManager)scene.Game.Services.GetService(typeof(IInputService))).GetKeyboard(); keyboard.KeyPressed += HandleKeyDown; keyboard.KeyReleased += HandleKeyUp; }
public ImageObject(Microsoft.Xna.Framework.Game game, Torch.Object parent, string imageName) : base(game, parent) { Content = (ContentManager)(Game.Services.GetService(typeof(ContentManager))); _imageName = imageName; _image = Content.Load <Texture2D>(imageName); SourceRectangle = new Rectangle(0, 0, _image.Width, _image.Height); }
public TextureObject(Microsoft.Xna.Framework.Game game, Torch.Object parent) : base(game, parent) { _texture = new Texture2D(GraphicsDevice, 1, 1); }
public SpriteObject(Microsoft.Xna.Framework.Game game, Torch.Object parent, string image) : base(game, parent, image) { }
public TextObject(Microsoft.Xna.Framework.Game game, Torch.Object parent) : base(game, parent) { }
public BackgroundLayer(Scene scene, Torch.Object parent, string image) : base(scene, parent) { Components.Add(new ImageObject(Game, this, image)); }