Example #1
0
        private static ISayComponent getSayComponent(float buttonHeight)
        {
            TypedParameter       outfitParameter        = new TypedParameter(typeof(IOutfitComponent), null);
            ISayLocationProvider location               = new MessageBoxLocation(AGSGame.Game);
            TypedParameter       locationParameter      = new TypedParameter(typeof(ISayLocationProvider), location);
            TypedParameter       faceDirectionParameter = new TypedParameter(typeof(IFaceDirectionComponent), null);
            TypedParameter       configParameter        = new TypedParameter(typeof(ISayConfig), AGSSayConfig.FromConfig(Config, buttonHeight));

            return(AGSGame.Resolver.Container.Resolve <ISayComponent>(locationParameter, outfitParameter,
                                                                      faceDirectionParameter, configParameter));
        }
Example #2
0
        private static ISayComponent getSayComponent(float buttonHeight, IGame game, IMessageBoxSettings settings)
        {
            TypedParameter       outfitParameter        = new TypedParameter(typeof(IOutfitComponent), null);
            ISayLocationProvider location               = new MessageBoxLocation(game, settings);
            TypedParameter       locationParameter      = new TypedParameter(typeof(ISayLocationProvider), location);
            TypedParameter       faceDirectionParameter = new TypedParameter(typeof(IFaceDirectionComponent), null);
            TypedParameter       configParameter        = new TypedParameter(typeof(ISayConfig), AGSSayConfig.FromConfig(settings.DisplayConfig, buttonHeight));
            var resolver = (Resolver)game.Resolver;

            return(resolver.Resolve <ISayComponent>(locationParameter, outfitParameter,
                                                    faceDirectionParameter, configParameter));
        }