void Initialise() { CaractHumainStuff test = CaractHumainStuff.ARC; CaractHumainCheveux test2 = CaractHumainCheveux.BLANC; List <CaractMonster> allCaracMonster = new List <CaractMonster>(); List <CaractHumain> allCaracHumain = new List <CaractHumain>(); CaractMonster[] allCaracMonsterA = new CaractMonster[CaractMonster.GetAllCarac().Count]; CaractHumain[] allCaracHumainA = new CaractHumain[CaractHumain.GetAllCarac().Count]; CaractMonster.GetAllCarac().CopyTo(allCaracMonsterA); CaractHumain.GetAllCarac().CopyTo(allCaracHumainA); allCaracMonster = allCaracMonsterA.ToList(); allCaracHumain = allCaracHumainA.ToList(); //System.Array.Copy( , allCaracMonster, CaractMonster.GetAllCarac().Count); Tip tip; for (int i = 0; i < allCaracMonster.Count && allCaracHumain.Count > 0;) { tip = new Tip(); int randIndexMonster = Random.Range(0, allCaracMonster.Count); int randIndexHumain = Random.Range(0, allCaracHumain.Count); tip.caracMonster = allCaracMonster[randIndexMonster]; tip.caracHumain = allCaracHumain[randIndexHumain]; allCaracMonster.RemoveAt(randIndexMonster); allCaracHumain.RemoveAt(randIndexHumain); listTips.Add(tip); ModRoll roll = ModRoll.GetRandomMod(); tip.modroll = roll; } CaractMonster.GetAllCarac().CopyTo(allCaracMonsterA); allCaracMonster = allCaracMonsterA.ToList(); for (int i = 0; i < allCaracMonster.Count && allCaracHumain.Count > 0;) { tip = new Tip(); int randIndexMonster = Random.Range(0, allCaracMonster.Count); int randIndexHumain = Random.Range(0, allCaracHumain.Count); tip.caracMonster = allCaracMonster[randIndexMonster]; tip.caracHumain = allCaracHumain[randIndexHumain]; allCaracMonster.RemoveAt(randIndexMonster); allCaracHumain.RemoveAt(randIndexHumain); ModRoll roll = ModRoll.GetRandomMod(); tip.modroll = roll; listTips.Add(tip); } foreach (Tip t in listTips) { Tip newTip = new Tip(); newTip.CopyTips(t); tipsNotKnownByPlayer.Add(newTip); } }