Ejemplo n.º 1
0
        public Human()
        {
            Common = new CharacterCommon();
            States = new CharacterStates();
            Memory = new CharacterMemory();

            Id = Guid.NewGuid();
            Common.Type = CharacterType.Human;
        }
Ejemplo n.º 2
0
        private CharacterCommon GetCommon()
        {
            var common = new CharacterCommon();

            common.Gender = Randomizer.Random.Next(100) < 60 ? Gender.Male : Gender.Female;
            common.Age = Randomizer.Random.Next(100) < 75 ? 20 + Randomizer.Random.Next(15) : 30 + Randomizer.Random.Next(25);

            if (common.Gender == Gender.Male)
            {
                common.Weight = 70 + Randomizer.Random.Next(28);
                common.Height = 175 + Randomizer.Random.Next(15);
            }
            else
            {
                common.Weight = 55 + Randomizer.Random.Next(18);
                common.Height = 165 + Randomizer.Random.Next(20);
            }

            common.Name = nameGenerator.Create(common.Gender);

            return common;
        }