public PhysicsFight() { TestName = Regex.Replace(GetType().Name, @"(\B[A-Z])", " $1"); //新建一个物理世界,参数为gravity,为10,box2D中的计量单位为米 World = new World(new Vector2(0, -10)); World.SetContactListener(this); World.DestructionListener = this; World.Drawer = Drawer; GroundBody = World.CreateBody(new BodyDef()); DumpLogger.Instance = new UnityLogger(); instance = this; }
private void Start() { PhysicsFight = new PhysicsFight(); FixedUpdate.Start(); }