public static void Run(Demo demo) { LoadSettings(); demo.Run(); while (ExitWithReload) { ExitWithReload = false; if (!SelectLibrary()) { return; } demo.Run(); } }
public static void Initialize(Demo demo) { Application.EnableVisualStyles(); // Check if BulletSharp exists try { Assembly.Load("BulletSharp"); } catch (Exception e) { MessageBox.Show(e.ToString(), "BulletSharp Error!"); return; } // Load settings XmlElement root = GetSettingsDocumentRoot(); XmlNodeList l = root.GetElementsByTagName("graphicsframework"); if (l.Count == 1) { XmlElement graphics = l.Item(0) as XmlElement; GraphicsLibraryName = graphics.GetAttribute("value"); } if (GraphicsLibraryName == null) { if (!SelectLibrary()) { return; } } demo.Run(); while (ExitWithReload) { ExitWithReload = false; if (!SelectLibrary()) { return; } demo.Run(); } }
void Start() { //demo = new CollisionInterfaceDemo.CollisionInterfaceDemo(); //demo = new BasicDemo.BasicDemo(); //demo = new SoftDemo.SoftDemo(); //demo = new BenchmarkDemo.BenchmarkDemo(); //demo = new CharacterDemo.CharacterDemo(); demo = new ConstraintDemo.ConstraintDemo(); demo.DebugDrawMode = DebugDrawModes.DrawWireframe; demo.Run(); demo.IsDebugDrawEnabled = true; }
void RunDemo(string nm) { if (nm.Equals("BasicDemo")) { demo = new BasicDemo.BasicDemo(); } if (nm.Equals("BenchmarkDemo")) { demo = new BenchmarkDemo.BenchmarkDemo(); } if (nm.Equals("Box2DDemo")) { demo = new Box2DDemo.Box2DDemo(); } if (nm.Equals("BspDemo")) { demo = new BspDemo.BspDemo(); } if (nm.Equals("CcdPhysicsDemo")) { demo = new CcdPhysicsDemo.CcdPhysicsDemo(); } if (nm.Equals("CharacterDemo")) { demo = new CharacterDemo.CharacterDemo(); } if (nm.Equals("CollisionInterfaceDemo")) { demo = new CollisionInterfaceDemo.CollisionInterfaceDemo(); } if (nm.Equals("ConcaveConvexCastDemo")) { demo = new ConcaveConvexCastDemo.ConcaveConvexCastDemo(); } if (nm.Equals("ConcaveRaycastDemo")) { demo = new ConcaveRaycastDemo.ConcaveRaycastDemo(); } if (nm.Equals("ConstraintDemo")) { demo = new ConstraintDemo.ConstraintDemo(); } if (nm.Equals("ConvexDecompositionDemo")) { demo = new ConvexDecompositionDemo.ConvexDecompositionDemo(); } if (nm.Equals("DistanceDemo")) { demo = new DistanceDemo.DistanceDemo(); } if (nm.Equals("FeatherStoneDemo")) { demo = new FeatherStoneDemo.FeatherStoneDemo(); } if (nm.Equals("GImpactTestDemo")) { demo = new GImpactTestDemo.GImpactTestDemo(); } if (nm.Equals("MotorDemo")) { demo = new MotorDemo.MotorDemo(); } if (nm.Equals("PendulumDemo")) { demo = new PendulumDemo.PendulumDemo(); } if (nm.Equals("RagdollDemo")) { demo = new RagdollDemo.RagdollDemo(); } if (nm.Equals("RollingFrictionDemo")) { demo = new RollingFrictionDemo.RollingFrictionDemo(); } if (nm.Equals("SerializeDemo")) { demo = new SerializeDemo.SerializeDemo(); } if (nm.Equals("SoftDemo")) { demo = new SoftDemo.SoftDemo(); } if (nm.Equals("VehicleDemo")) { demo = new VehicleDemo.VehicleDemo(); } demo.DebugDrawMode = DebugDrawModes.DrawWireframe; demo.Run(); IsDebugDrawEnabled = false; }