public void ConfigureProvider(ServiceProvider provider) { var commands = provider.GetService <CommandService>(); var inputs = provider.GetService <InputCommandService>(); commands.TryAddCommand(new CommandContext() { Word = "ui", Commands = new CommandContext[] { new CommandContext() { Word = "interact", Arguments = new ArgContext[] { new ArgContext() { Identifier = "state", Aliases = "s".ToCharArray(), Required = true, Type = ArgType.FromEnum <ButtonState>() } } } } }); inputs.Add(new InputCommandContext() { Handle = "guppy_ui_interact", DefaultInput = new InputType(MouseButton.Left), Lockable = true, Commands = new[]
protected override void PreInitialize(ServiceProvider provider) { base.PreInitialize(provider); this.OnDraw += this.Draw; this.OnUpdate += this.Update; this.OnAdd += this.HandleSceneAdded; }
public void ConfigureProvider(ServiceProvider provider) { // throw new NotImplementedException(); }
protected override T Create <T>(ServiceProvider provider, ServiceConfigurationKey configurationKey, Action <T, ServiceProvider, ServiceConfiguration> setup = null, Guid?id = null) => base.Create(provider.CreateScope().ServiceProvider as ServiceProvider, configurationKey, setup, id);