Inheritance: Clothing
Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,Description,Size,Colour,Quantity")] Gloves gloves)
        {
            if (id != gloves.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(gloves);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!GlovesExists(gloves.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(gloves));
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public Armor Convert(ItemDTO value, object state)
        {
            var entity = new Gloves();

            this.Merge(entity, value, state);
            return(entity);
        }
Exemplo n.º 3
0
 public void OneTimeSetUp()
 {
     mask          = new Mask();
     gloves        = new Gloves();
     handSanitizer = new HandSanitizer();
     medicalGown   = new MedicalGown();
 }
Exemplo n.º 4
0
        public async Task <IActionResult> Create([Bind("ID,Description,Size,Colour,Quantity")] Gloves gloves)
        {
            if (ModelState.IsValid)
            {
                _context.Add(gloves);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(gloves));
        }
        public void Test_Constructor()
        {
            //Arrange
            Gloves gloves;

            // Act
            gloves = new Gloves();

            //Assert
            Assert.Equal(25, gloves.price);
        }
        public void Test_Examine()
        {
            //Arrange
            Gloves gloves = new Gloves();
            string result;

            // Act
            result = gloves.Examine();

            //Assert
            Assert.Equal("Gloves, 25 kr", result);
        }
        public void Test_Use()
        {
            //Arrange
            Gloves gloves = new Gloves();
            string result;

            // Act
            result = gloves.Use();

            //Assert
            Assert.Equal("The gloves are worn", result);
        }
Exemplo n.º 8
0
 public void CreateEffects(IEquipmentEffectFactory equipmentEffectFactory)
 {
     Head?.CreateEffect(equipmentEffectFactory);
     Body?.CreateEffect(equipmentEffectFactory);
     Boots?.CreateEffect(equipmentEffectFactory);
     Gloves?.CreateEffect(equipmentEffectFactory);
     LeftHand?.CreateEffect(equipmentEffectFactory);
     RightHand?.CreateEffect(equipmentEffectFactory);
     Neck?.CreateEffect(equipmentEffectFactory);
     LeftRing?.CreateEffect(equipmentEffectFactory);
     RightRing?.CreateEffect(equipmentEffectFactory);
 }
Exemplo n.º 9
0
        public async Task <IActionResult> OnGetAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Gloves = await _context.Gloves.FirstOrDefaultAsync(m => m.Id == id);

            if (Gloves == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Exemplo n.º 10
0
        private void CreateGloves()
        {
            Gloves newGloves = new Gloves();

            newGloves.name        = "Nothing";
            newGloves.description = "Look at you, naked hands";
            newGloves.defense     = 0;
            gloveList.Add(newGloves);
            //
            newGloves             = new Gloves();
            newGloves.name        = "Mood Glove";
            newGloves.description = "A glove that changes colors depending on your mood";
            newGloves.defense     = 5;
            gloveList.Add(newGloves);
            //
        }
Exemplo n.º 11
0
 public void Dispose()
 {
     Armor.Dispose();
     MainHand.Dispose();
     OffHand.Dispose();
     Ring.Dispose();
     Ring2.Dispose();
     Amulet.Dispose();
     Helm.Dispose();
     Gloves.Dispose();
     Boots.Dispose();
     Belt.Dispose();
     Flasks.ForEach(vm => vm.Dispose());
     TreeJewels.ForEach(vm => vm.Dispose());
     ItemJewels.Values.Flatten().ForEach(vm => vm.Dispose());
 }
Exemplo n.º 12
0
        public async Task <IActionResult> OnPostAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Gloves = await _context.Gloves.FindAsync(id);

            if (Gloves != null)
            {
                _context.Gloves.Remove(Gloves);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 13
0
        public void Remove(IEquippment equippment)
        {
            if (equippment == Weapon)
            {
                Weapon = null;
            }

            if (equippment == Chest)
            {
                Chest = null;
            }

            if (equippment == Gloves)
            {
                Gloves = null;
            }
        }
Exemplo n.º 14
0
        public NPC(string name, Helmet h, Cuirass c, Gloves g, Greaves gg, Boots b, Weapon w, Faction f)
        {
            this.name   = name;
            this.health = 100;
            void equip(Armor a)
            {
                if (a != null)
                {
                    inventory.Equip(a);
                }
            }

            equip(h); equip(c); equip(g); equip(gg); equip(b);
            if (w != null)
            {
                Equip(w);
            }
            this.faction = f;
        }
Exemplo n.º 15
0
 public static bool IsArmor(string itemBase)
 {
     if (Boots.Contains(itemBase))
     {
         return(true);
     }
     if (Gloves.Contains(itemBase))
     {
         return(true);
     }
     if (BodyArmors.Contains(itemBase))
     {
         return(true);
     }
     if (Helmets.Contains(itemBase))
     {
         return(true);
     }
     if (Shields.Contains(itemBase))
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 16
0
        public static string GetItemType(string itemBase)
        {
            if (Bows.Contains(itemBase))
            {
                return("Bow");
            }
            if (Claws.Contains(itemBase))
            {
                return("Claw");
            }
            if (OneHandedAxes.Contains(itemBase))
            {
                return("One Hand Axe");
            }
            if (OneHandedMaces.Contains(itemBase))
            {
                return("One Hand Mace");
            }
            if (OneHandedSwords.Contains(itemBase))
            {
                return("One Hand Sword");
            }
            if (TwoHandedAxes.Contains(itemBase))
            {
                return("Two Hand Axe");
            }
            if (TwoHandedMaces.Contains(itemBase))
            {
                return("Two Hand Mace");
            }
            if (Sceptres.Contains(itemBase))
            {
                return("Sceptre");
            }
            if (Daggers.Contains(itemBase))
            {
                return("Dagger");
            }
            if (Staves.Contains(itemBase))
            {
                return("Staff");
            }
            if (Belts.Contains(itemBase))
            {
                return("Belt");
            }
            if (Amulets.Contains(itemBase))
            {
                return("Amulet");
            }
            if (Rings.Contains(itemBase))
            {
                return("Ring");
            }
            if (Boots.Contains(itemBase))
            {
                return("Boots");
            }
            if (Gloves.Contains(itemBase))
            {
                return("Gloves");
            }
            if (BodyArmors.Contains(itemBase))
            {
                return("Body Armour");
            }
            if (Wands.Contains(itemBase))
            {
                return("Wand");
            }
            if (Helmets.Contains(itemBase))
            {
                return("Helmet");
            }
            if (Shields.Contains(itemBase))
            {
                return("Shield");
            }
            if (Jewels.Contains(itemBase))
            {
                return("Jewel");
            }
            if (itemBase == "Gem")
            {
                return(itemBase);
            }
            if (Quivers.Contains(itemBase))
            {
                return("Quiver");
            }

            return("No type found");
        }
Exemplo n.º 17
0
 // Implement this method in a buddy class to set properties that are specific to 'Gloves' (if any)
 partial void Merge(Gloves entity, ItemDTO dto, object state);
Exemplo n.º 18
0
 // Constructeur
 public Skin()
 {
     this.beard = new Beard();
     this.hair = new Hair();
     this.hat = new Hat();
     this.body = new Body();
     this.tshirt = new Tshirt();
     this.pant = new Pant();
     this.gloves = new Gloves();
     this.eyes = new Eyes();
 }
Exemplo n.º 19
0
 protected void CloneTo(Gloves item)
 => base.CloneTo(item);
Exemplo n.º 20
0
        static void Main(string[] args)
        {
            Logger.Instance().Info("Program started");

            CharacterFactory CharFactory = new CharacterFactory();
            Spell            blind       = new Spell("Blind", 15, 3, "Blinds only near objects, with big amount of damage", new Blind());
            Spell            knockout    = new Spell("knockout", 2, 8, "Knockout created", new Knockout());

            EnemyRobotAdapter ERobot = new EnemyRobotAdapter(new EnemyRobot(25, 25, 50, 7, new Tuple <int, int>(13, 1)));
            ICommand          ERobot_command_fire    = new CommandFireAtEnemy((IEnemy)ERobot);
            ICommand          ERobot_command_forward = new CommandForwardToEnemy((IEnemy)ERobot);
            ICommand          ERobot_command_retreat = new CommandRetreat((IEnemy)ERobot);

            ERobot_command_forward.execute();
            ERobot_command_fire.execute();
            ERobot_command_retreat.execute();
            ERobot_command_retreat.undo();


            myCharacter = CharFactory.CreateCharacter(2, "Elfas112");

            IObserver achObserver = new AchievementObserver();
            IObserver queObserver = new QuestObserver();

            myCharacter.Subscribe(achObserver);
            myCharacter.Subscribe(queObserver);

            if (myCharacter != null)
            {
                myCharacter.Notify("EVENT_CHARACTER_CREATION"); switch (myCharacter.GetType().ToString())
                {
                case "Zaidimukas.Character.HumanCharacter": myCharacter.Notify("QUEST_BECOME_HUMAN"); break;

                case "Zaidimukas.Character.ElfCharacter": myCharacter.Notify("QUEST_BECOME_ELF"); break;

                case "Zaidimukas.Character.DwarfCharacter": myCharacter.Notify("QUEST_BECOME_DWARF");
                    break;
                }
                myCharacter.Walk(1);
                myCharacter.CastSpell(blind);
                myCharacter.Walk(1);
                myCharacter.Walk(2);
                myCharacter.Walk(3);
                myCharacter.Walk(1);
                myCharacter.CastSpell(knockout);
                myCharacter.Walk(4);
                ArmorUnit arm  = new ArmorUnit("Shirts", 4);
                Armor     arm1 = new Gloves(new BasicArmor(arm));
                myCharacter.SetArmor(arm1);
                Console.WriteLine(myCharacter.ArmorDecorator.getArmors().ToString());
                arm1 = new Gloves(arm1);



                //myCharacter.SetArmor(arm1);
                //Console.WriteLine(myCharacter.ArmorDecorator.getArmors().ToString());

                //arm1 = new Helmet(arm1);



                //myCharacter.SetArmor(arm1);
                //Console.WriteLine(myCharacter.ArmorDecorator.getArmors().ToString());
            }
            // state

            myCharacter.AttackInState();
            myCharacter.changeState(myCharacter.blindedState, 3000);
            myCharacter.AttackInState();
            myCharacter.CastSpellInState(blind);
            myCharacter.WalkInState(3);
            myCharacter.changeState(myCharacter.normalState, 3000);
            myCharacter.WalkInState(4);

            // composite
            MyCharacter elf = CharFactory.CreateCharacter(2, "Elf");

            myCharacter.printGoldAndName();
            MyCharacter humanChar  = CharFactory.CreateCharacter(3, "Human");
            MyCharacter humanChar2 = CharFactory.CreateCharacter(3, "Human2");
            MyCharacter humanChar3 = CharFactory.CreateCharacter(2, "Human3");

            int goldForKill = 3000;

            Console.WriteLine($"You have gained {goldForKill} coins!");
            IComponent elfComp         = elf;
            IComponent humanCharComp   = humanChar;
            IComponent myCharacterComp = myCharacter;
            IComponent humanChar2Comp  = humanChar2;
            IComponent humanChar3Comp  = humanChar3;

            IComponent party = new Team
            {
                name    = "Best party ever",
                players =
                {
                    elfComp,
                    humanCharComp,
                    humanChar2Comp,
                    humanChar3Comp
                }
            };
            IComponent teams = new Team
            {
                players = { party, myCharacter }
            };

            Logger.Instance().Info("Team");
            teams.addGold(goldForKill);
            teams.printGoldAndName();
            // chain of responsibility
            myCharacter.GetRank();
            myCharacter.LevelUp();
            myCharacter.GetRank();
            myCharacter.LevelUp();

            myCharacter.GetRank();
            myCharacter.LevelDown();
            myCharacter.GetRank();
            //null object

            ICommandFactory commandFactory = new ICommandFactory();
            EnemyHuman      EHuman         = new EnemyHuman(50, 100, 1000, 1, new Tuple <int, int>(15, 5));
            IEnemy          enemyHuman     = new EnemyHumanAdapter(EHuman);
            ICommand        retreatCommand = commandFactory.CreateCommand(enemyHuman, 3);
            ICommand        nullCommand    = commandFactory.CreateCommand(enemyHuman, 1123464);

            //visitor

            EnemyHuman tank = new EnemyHuman(2, 2, 2, 2, new Tuple <int, int>(2, 1));
            ExperienceWorthCalculator normalGain  = new NormalExperienceGain();
            ExperienceWorthCalculator boostedGain = new BoostedExperienceGain();

            Console.WriteLine($"Without exp boost enemy is worth: {tank.GetExp(normalGain)} exp");
            Console.WriteLine($"With exp boost enemy is worth: {tank.GetExp(boostedGain)} exp");

            //mediator

            Tracker m = new Tracker();

            Notification c1 = new Notification(m);
            Achievement  c2 = new Achievement(m);

            m.not = c1;
            m.ach = c2;

            c1.Send("10 seconds Have passed");
            c2.Send("Achievement Uncloked: Time flies");

            //template

            Sword sword = new Sword(1, 5, "long Sword");

            sword.SelectWeapon();

            Knife knife = new Knife(1, 4, "Fast Knife");

            knife.SelectWeapon();

            //iterator

            KnifeList kl = new KnifeList();

            kl.AddKnife(knife);
            kl.AddKnife(1, 9, "Dagger");
            var a1 = kl.GetEnumerator();

            a1.MoveNext();
            var g = a1.Current;

            Swords sws = new Swords();

            sws.Add(sword);
            sws.Add(new Sword(1, 9, "test"));
            var test = sws.GetEnumerator();

            test.MoveNext();

            //MEMENTO
            org = new Originator(myCharacter, null);


            var list = new IEnemy[] {
                (IEnemy)ERobot
            };

            saveState(list);
            Console.Write("");

            Console.Write("charaacter before update");
            myCharacter.CharacterToString();

            myCharacter.Walk(1);
            myCharacter.Walk(1);
            myCharacter.healthPoints = 4;
            Console.Write("charaacter After update");
            myCharacter.CharacterToString();

            Console.Write("charaacter Restored");
            restoreState();
            myCharacter.CharacterToString();

            Logger.Instance().Info("Program ended");
            myCharacter.Unsubscribe(achObserver);
            myCharacter.Unsubscribe(queObserver);
        }
Exemplo n.º 21
0
    // Use this for initialization
    void Start()
    {
        //Initialize Abilities - TODO Should this be done statically?
        tumble = new Tumble();
        tumble.setScript(this);
        silverBolts = new Silver_Bolts();
        silverBolts.setScript(this);
        condemn = new Condemn();
        condemn.setScript(this);
        finalHour = new Final_Hour();
        finalHour.setScript(this);
        shadowBolt = new ShadowBolt();
        shadowBolt.setScript(this);

        IconWidth = tumbleTexture.width;
        IconHeight = tumbleTexture.height;

        level = 1;

        //Initially not running
        running = false;

        idling = true;

        a = gameObject.GetComponent(typeof(Animation)) as Animation;

        originalRotation = transform.localRotation;

        alive = true;

        inventory = new Item[inventorySize];

        Bow startingBow = new Bow();
        startingBow.randomizeWeapon(1, 1);
        awardItem(startingBow);

        Helm startingHelm = new Helm();
        startingHelm.randomizeArmor(1, 1);
        awardItem(startingHelm);

        Chest startingChest = new Chest();
        startingChest.randomizeArmor(1, 1);
        awardItem(startingChest);

        Gloves startingGloves = new Gloves();
        startingGloves.randomizeArmor(1, 1);
        awardItem(startingGloves);

        Boots startingBoots = new Boots();
        startingBoots.randomizeArmor(1, 1);
        awardItem(startingBoots);

        checkpointTexture = Resources.Load("CheckpointTexture/CheckpointMaybe") as Texture2D;
        playerPortrait = Resources.Load("CheckpointTexture/vayne_circle") as Texture2D;
        playerManaTexture = Resources.Load("PlayerTextures/mana") as Texture2D;
        swiftDeathTexture = Resources.Load("VayneTextures/swiftDeath") as Texture2D;
        shadowBoltTexture = Resources.Load("VayneTextures/ShadowBolt") as Texture2D;

        leftClickOverlay = Resources.Load("InstructionPage/leftclick") as Texture2D;
        rightClickOverlay = Resources.Load("InstructionPage/rightclick") as Texture2D;

        winTexture = Resources.Load("GUITextures/victoryFull") as Texture2D;
        lossTexture = Resources.Load("GUITextures/defeatFull") as Texture2D;
        continueButton = Resources.Load("InstructionPage/Continue") as Texture2D;
        continueButtonHighlighted = Resources.Load("InstructionPage/Continue2") as Texture2D;

        equipment = new Item[6]; //TODO decide on size

        equipmentRect = new Rect(50, 50, 300, 300);
        inventoryRect = new Rect(Screen.width - 350, 50, 300, Mathf.Ceil(inventorySize / 6) * 50 + 20);
        confirmRect = new Rect((Screen.width / 2) - 150, Screen.height / 4, 300, 300);
        continueRect = new Rect((Screen.width / 2) - (continueButton.width / 2), Screen.height * (3.0f/4.0f), continueButton.width, continueButton.height);

        movementSpeed = 1;

        recalculateStats();

        if(PlayerPrefs.GetString("IsSaveGame") == "true"){
            name = PlayerPrefs.GetString("SaveFileName");
            Load();
        }

        currentHealth = maxHealth;
        currentMana = maxMana;

        Save();
    }
Exemplo n.º 22
0
 public Gloves(Gloves gloves)
     : base(gloves)
 {
     this.color = gloves.color;
 }
Exemplo n.º 23
0
 public Skin(Beard beard, Hair hair, Hat hat, Body body, Tshirt tshirt, Pant pant, Gloves gloves, Eyes eyes)
 {
     this.beard = beard;
     this.hair = hair;
     this.hat = hat;
     this.body = body;
     this.tshirt = tshirt;
     this.pant = pant;
     this.gloves = gloves;
     this.eyes = eyes;
 }
Exemplo n.º 24
0
        static void Main(string[] args)
        {
            List <Accessory> accessories = new List <Accessory>();
            List <Animal>    animals     = new List <Animal>();

            var leatherGloves = new Gloves();

            leatherGloves.Name  = "Leather Gloves";
            leatherGloves.Color = "Brown";
            leatherGloves.Cost  = 135;
            accessories.Add(leatherGloves);

            var tophat = new Hat();

            tophat.Name  = "a Tophat";
            tophat.Color = "Black";
            tophat.Cost  = 255;
            accessories.Add(tophat);

            var rolex = new Watch();

            rolex.Name  = "a Rolex Watch";
            rolex.Color = "Gold";
            rolex.Cost  = 433000;
            accessories.Add(rolex);

            var polly = new Bird();

            polly.Name          = "Polly";
            polly.Color         = "Green";
            polly.NumberOfLimbs = 4;
            animals.Add(polly);

            var snowball = new Cat();

            snowball.Name          = "Snowball";
            snowball.Color         = "White";
            snowball.NumberOfLimbs = 4;
            animals.Add(snowball);

            var nemo = new Fish();

            nemo.Name          = "Nemo";
            nemo.Color         = "Orange";
            nemo.NumberOfLimbs = 0;
            animals.Add(nemo);

            foreach (var accesory in accessories)
            {
                Console.WriteLine();
                Console.WriteLine("This accesory is " + accesory.Name);
                Console.WriteLine("This accessory is the color " + accesory.Color);
                Console.WriteLine("This accessory costs " + accesory.Cost + " SEK");

                if (accesory is Gloves gloves)
                {
                    gloves.Usage();
                    gloves.Reaction();
                }

                else if (accesory is Hat hat)
                {
                    hat.Usage();
                    hat.Reaction();
                }

                else if (accesory is Watch watch)
                {
                    watch.Usage();
                    watch.Reaction();
                }
            }

            foreach (var animal in animals)
            {
                Console.WriteLine();
                Console.WriteLine("This animal's name is " + animal.Name);
                Console.WriteLine("This animal is the color " + animal.Color);
                Console.WriteLine("This animal has " + animal.NumberOfLimbs + " number of limbs");

                if (animal is Bird bird)
                {
                    bird.Move();
                    bird.Eat();
                }

                else if (animal is Cat cat)
                {
                    cat.Move();
                    cat.Eat();
                }

                else if (animal is Fish fish)
                {
                    fish.Move();
                    fish.Eat();
                }
            }
        }
Exemplo n.º 25
0
    // Use this for initialization
    void Start()
    {
        //Initialize Abilities - TODO Should this be done statically?
        dStrike = new Decisive_Strike();
        dStrike.setScript(this);
        courage = new Courage();
        courage.setScript(this);
        judgement = new Judgement();
        judgement.setScript(this);
        dJustice = new Demacian_Justice();
        dJustice.setScript(this);
        valor = new Valor();
        valor.setScript(this);

        level = 1;

        IconWidth = judgementTexture.width;
        IconHeight = judgementTexture.height;

        //Initially not running
        running = false;

        idling = true;

        a = gameObject.GetComponent(typeof(Animation)) as Animation;

        originalRotation = transform.localRotation;
        spinning = false;

        alive = true;

        inventory = new Item[inventorySize];

        TwoHandedSword startingSword = new TwoHandedSword();
        startingSword.randomizeWeapon(1, 1);
        awardItem(startingSword);

        Helm startingHelm = new Helm();
        startingHelm.randomizeArmor(1, 1);
        awardItem(startingHelm);

        Chest startingChest = new Chest();
        startingChest.randomizeArmor(1, 1);
        awardItem(startingChest);

        Gloves startingGloves = new Gloves();
        startingGloves.randomizeArmor(1, 1);
        awardItem(startingGloves);

        Boots startingBoots = new Boots();
        startingBoots.randomizeArmor(1, 1);
        awardItem(startingBoots);

        checkpointTexture = Resources.Load("CheckpointTexture/CheckpointMaybe") as Texture2D;
        playerPortrait = Resources.Load("CheckpointTexture/garen_circle") as Texture2D;
        playerManaTexture = Resources.Load("PlayerTextures/mana") as Texture2D;

        leftClickOverlay = Resources.Load("InstructionPage/leftclick") as Texture2D;
        rightClickOverlay = Resources.Load("InstructionPage/rightclick") as Texture2D;

        winTexture = Resources.Load("GUITextures/victoryFull") as Texture2D;
        lossTexture = Resources.Load("GUITextures/defeatFull") as Texture2D;
        continueButton = Resources.Load("InstructionPage/Continue") as Texture2D;
        continueButtonHighlighted = Resources.Load("InstructionPage/Continue2") as Texture2D;

        equipment = new Item[5]; //TODO decide on size

        equipmentRect = new Rect(50, 50, 300, 300);
        inventoryRect = new Rect(Screen.width - 350, 50, 300, Mathf.Ceil(inventorySize / 6) * 50 + 20);
        confirmRect = new Rect((Screen.width / 2) - 150, Screen.height / 4, 300, 300);
        continueRect = new Rect((Screen.width / 2) - (continueButton.width / 2), Screen.height * (3.0f/4.0f), continueButton.width, continueButton.height);

        movementSpeed = 1;

        recalculateStats();

        if(PlayerPrefs.GetString("IsSaveGame") == "true"){
            name = PlayerPrefs.GetString("SaveFileName");
            Load();
        }

        currentHealth = maxHealth;

        Save();
    }
Exemplo n.º 26
0
    // Method
    public void Randomize()
    {
        List<Eyes> eyes = new List<Eyes>();
        foreach (Eyes e in Clothing.Eyes)
            eyes.Add(e);
        this.eyes = eyes[Random.Range(0, eyes.Count - 1)];

        List<Gloves> gloves = new List<Gloves>();
        foreach (Gloves g in Clothing.Gloves)
            gloves.Add(g);
        this.gloves = gloves[Random.Range(0, gloves.Count - 1)];

        List<Pant> pant = new List<Pant>();
        foreach (Pant p in Clothing.Pants)
            pant.Add(p);
        this.pant = pant[Random.Range(0, pant.Count - 1)];

        List<Tshirt> tshirt = new List<Tshirt>();
        foreach (Tshirt t in Clothing.Tshirts)
            tshirt.Add(t);
        this.tshirt = tshirt[Random.Range(0, tshirt.Count - 1)];

        List<Body> body = new List<Body>();
        foreach (Body b in Clothing.Bodies)
            body.Add(b);
        this.body = body[Random.Range(0, body.Count - 1)];

        List<Hair> hair = new List<Hair>();
        foreach (Hair h in Clothing.Hairs)
            hair.Add(h);
        this.hair = hair[Random.Range(0, hair.Count - 1)];

        if (this.hair.GetTypeHair == Hair.TypeHair.Crete)
            this.hat = Hat.NoneHat;
        else
        {
            List<Hat> hat = new List<Hat>();
            foreach (Hat h in Clothing.Hats)
                hat.Add(h);
            this.hat = hat[Random.Range(0, hat.Count - 1)];
        }

        List<Beard> beard = new List<Beard>();
        foreach (Beard b in Clothing.Beards)
            beard.Add(b);
        this.beard = beard[Random.Range(0, beard.Count - 1)];
    }