protected override void OnLoad(EventArgs e) { var random = new Random(); StaticReferences.GraphicsSettings(); StaticReferences.InitReferences(); models = new List <Model>(0); Model model = new MDLX(@"binary_files\bb00.map"); model.Compile(); models.Add(model); for (int i = 0; i < 1; i++) { model = new DAE(@"debug_files\P_EX100\P_EX100.dae"); model.Compile(); model.Skeleton.Position = new Vector3(-100, 0, 0); model.Controller.Moveset.AnimationIndex = random.Next(0, model.Controller.Moveset.Animations.Count); model.Controller.Moveset.AnimationFrame = random.Next(0, (int)(model.Controller.Moveset.Animations[model.Controller.Moveset.AnimationIndex].MaxFrame - 1)); System.Threading.Thread.Sleep(1); float x = random.Next(-500, 500); System.Threading.Thread.Sleep(1); float y = random.Next(-500, 500); model.Skeleton.Position = new Vector3(x, 0, y); models.Add(model); Camera.Current.Target = model; } /* * model = new MDLX(@"binary_files\H_EX510\H_EX510.mdlx"); * model.Compile(); * model.Skeleton.Position = new Vector3(100, 0, 0); * models.Add(model); */ /*string[] mdlxes = Directory.GetFiles(@"E:\Jeux\KingdomHearts\app_KH2Tools\export\@KH2\obj\", "*.mdlx"); * int count = 0; * while (count<50) * { * int randomIndex = random.Next(0, mdlxes.Length); * FileInfo f = new FileInfo(mdlxes[randomIndex]); * if (f.Name.Contains("H_") && f.Length>200*1024) * { * model = new MDLX(f.FullName); * model.Compile(); * float x = random.Next(-500, 500); * System.Threading.Thread.Sleep(1); * float y = random.Next(-500, 500); * model.Skeleton.Position = new Vector3(x,0,y); * models.Add(model); * count++; * } * } * */ model = new DAE(@"debug_files\cube\cube.dae"); model.Compile(); model.Skeleton.Position = new Vector3(-100, 0, 100); models.Add(model); model = new DAE(@"debug_files\cube2\cube2.dae"); model.Compile(); model.Skeleton.Position = new Vector3(100, 0, 100); models.Add(model); OnUpdateFrame(null); base.OnLoad(e); }