예제 #1
0
 public Char()
 {
     Name  = MyRand.stringRand(CharProp.Names);
     Help  = MyRand.stringRand(CharProp.Helps);
     Fun   = MyRand.stringRand(CharProp.Funny);
     Damag = MyRand.stringRand(CharProp.Damage);
 }
예제 #2
0
        public string make_History(string HeroName, bool Gend)
        {
            string Hope;
            string HeroNameRod;

            if (Gend == true)
            {
                HeroNameRod = FromMass(HeroName, ForProperties.MenNames, ForProperties.MenNamesWho);
                Hope        = "уже и не надеялся на помощь, как ";
            }
            else
            {
                HeroNameRod = FromMass(HeroName, ForProperties.GirlNames, ForProperties.GirlNamesWho);
                Hope        = "уже и не надеялась на помощь, как ";
            }
            string story = "Вначале он " + MyRand.stringRand(CharProp.Damage) + ".\n";

            story += "Затем " + Name + MyRand.stringRand(CharProp.Funny) + HeroNameRod + ".\n";

            story += HeroName + Hope + Name + Help + ".\n";
            return(story);
        }
예제 #3
0
        static void Main(string[] args)
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("Я готов рассказать интересную историю, введите 2 и нажмите Enter ");
                if (Console.ReadLine() == "2")
                {
                    Console.Clear();
                    #region App_propertyes
                    SoundPlayer player = new SoundPlayer(Properties.Resources.noize1);     // звук печатающей машинки

                    bool   Hero_Gender    = MyRand.genderRand();                           // gender
                    string Hero_Name      = MyRand.nameRand(Hero_Gender);                  // name
                    string Hero_Transport = MyRand.stringRand(ForProperties.TransportVIN); // transport
                    string For_What       = MyRand.stringRand(Conditions.ToWhom);

                    _Appearance Hero_Appearance; // hero-look
                    Hero_Appearance.Hair     = MyRand.stringRand(ForProperties.HairColors);
                    Hero_Appearance.HeandObj = MyRand.stringRand(ForProperties.WeaponsIM);
                    Hero_Appearance.Skin     = MyRand.stringRand(ForProperties.SkinIM);

                    Hero myHero = new Hero(Hero_Name, Hero_Transport, Hero_Gender, Hero_Appearance);
                    Char myChar = new Char();
                    #endregion

                    #region Fairy_tale_story
                    string Story       = null;
                    string Part1_Start = myHero.Actions.WasLiving + myHero.PName + ". \n";
                    string Part2_Look  = "Волосы  " + myHero.Actions.NHim_or_NHer + "были " + myHero.Appearance.Hair + ", ";
                    Part2_Look += "а кожа " + myHero.Appearance.Skin + ".\n";
                    string Part3_Home = myHero.Actions.Living + MyRand.stringRand(Conditions.WhereLiving) + MyRand.stringRand(Conditions.Home);
                    Part3_Home += myHero.Actions.Love + MyRand.stringRand(Conditions.HomeFeelings) + "\n";
                    string Part4_Decide    = "Однажды, в " + MyRand.stringRand(Conditions.Weather) + ", " + myHero.PName + myHero.Actions.Decide + For_What + ".\n";
                    string Part5_DecideEnd = "Но перед поездкой " + myHero.PName + myHero.Actions.Take + MyRand.stringRand(ForProperties.WeaponsIM) + MyRand.stringRand(Conditions.WeaponForWhat) + ".\n";
                    Part5_DecideEnd += myHero.PName + myHero.Actions.Sit + myHero.PTransport + "и " + myHero.Actions.Go + ".\n";
                    string Part6_Happens    = "Спустя " + MyRand.stringRand(Conditions.Time) + myHero.PName + myHero.Actions.Happens + "в " + MyRand.stringRand(Conditions.Situations) + ".\n";
                    string Part7_Char       = "Казалось бы , надежды " + For_What + "исчезли, но вдруг , откуда ни возьмись , появился " + myChar.Name + ".\n";
                    string Part8_CharAction = myChar.make_History(Hero_Name, Hero_Gender);
                    string Part9_End        = "Так и " + myHero.Actions.Happens + myHero.PName + For_What + ".\n" + "\t\t\t\t\t\t";
                    string Part10_Final     = " Конец \n";

                    Story = Part1_Start + Part2_Look + Part3_Home + Part4_Decide + Part5_DecideEnd + Part6_Happens + Part7_Char + Part8_CharAction + Part9_End;
                    player.PlayLooping();
                    foreach (char c in Story)
                    {
                        Console.Write(c);
                        Thread.Sleep(60);
                    }
                    foreach (char c in Part10_Final)
                    {
                        Console.Write(c);
                        Thread.Sleep(250);
                    }

                    player.Stop();

                    Console.Write("\n\n\n\n\t\t\t\t\t Нажмите клавишу Enter");
                    Console.ReadLine();
                    #endregion
                }
            }
        }