Esempio n. 1
0
        public void RunAddBackground(Character character)
        {
            var backgroundObject = new Background();

            Console.WriteLine("Do you want Grim Hollow Advanced Backgrounds? Y/N");
            var yesNo = new List <string> {
                "y", "n"
            };
            string answer = CLIHelper.GetStringInList(yesNo);

            if (answer == "y")
            {
                character.ChosenBackground = Prompts.PickOption("background", Options.GHBackgrounds);
                Console.Clear();
                Console.WriteLine($"You've picked {character.ChosenBackground}.\n");
                var GHFillerObject = GHBackground.NewBackground(character);
                backgroundObject = AddBackground.AddGHBackground(GHFillerObject);
            }
            else if (answer == "n")
            {
                character.ChosenBackground = Prompts.PickOption("background", Options.Backgrounds);
                backgroundObject           = Background.NewBackground(character);
            }

            AddBackground.PersonalCharacteristics(character, backgroundObject);
            AddBackground.BackgroundSpecifics(character, backgroundObject);

            Console.Clear();
            Console.WriteLine("\nYou've finished adding your background!\n");
        }
Esempio n. 2
0
        internal async Task ExpandToFill(Rectangle bounds)
        {
            // set the intial state
            AddBackground.Opacity = .5;
            AddButton.Opacity     = 1;
            NameLabel.Opacity     = 1;
            PriceLabel.Opacity    = 1;

            // destination rect
            var destRect = new Rectangle(
                x: (bounds.Width / 2) - (this.Width / 2),
                y: 40,
                width: this.Width,
                height: this.Height
                );

            _ = AddBackground.FadeTo(0, animationSpeed / 2);
            _ = AddButton.FadeTo(0, animationSpeed / 2);
            _ = NameLabel.FadeTo(0, animationSpeed / 2);
            _ = PriceLabel.FadeTo(0, animationSpeed / 2);


            await this.LayoutTo(destRect, animationSpeed * 2, Easing.SinInOut);

            await this.LayoutTo(bounds.Inflate(50, 50), animationSpeed * 2, Easing.SinInOut);
        }