예제 #1
0
        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[]
예제 #2
0
파일: SceneList.cs 프로젝트: rettoph/Guppy
        protected override void PreInitialize(ServiceProvider provider)
        {
            base.PreInitialize(provider);

            this.OnDraw   += this.Draw;
            this.OnUpdate += this.Update;
            this.OnAdd    += this.HandleSceneAdded;
        }
예제 #3
0
 public void ConfigureProvider(ServiceProvider provider)
 {
     // throw new NotImplementedException();
 }
예제 #4
0
파일: SceneList.cs 프로젝트: rettoph/Guppy
 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);