public override void SpawnBody() { base.SpawnBody(); Motion = new PlaneMotionConstraint(this); TheRegion.PhysicsWorld.Add(Motion); Wings = new JointFlyingDisc(this) { IsAPlane = true }; TheRegion.AddJoint(Wings); HandleWheels(); }
public void TurnIntoPlane(PlayerEntity pilot) // TODO: Character! { PlanePilot = pilot; Plane = new PlaneMotionConstraint(this); TheRegion.PhysicsWorld.Add(Plane); foreach (InternalBaseJoint joint in Joints) // TODO: Just track this detail on the joint itself ffs { if (joint is JointFlyingDisc) { ((FlyingDiscConstraint)((JointFlyingDisc)joint).CurrentJoint).IsAPlane = true; } } }
public override void SpawnBody() { base.SpawnBody(); Body.LinearDamping = 0.0; HandleWheels(); Motion = new PlaneMotionConstraint(this); TheRegion.PhysicsWorld.Add(Motion); Wings = new JointFlyingDisc(this) { IsAPlane = true }; TheRegion.AddJoint(Wings); (Wings.CurrentJoint as FlyingDiscConstraint).PlaneLiftHelper = LiftHelper; }
// TODO: Character! public void TurnIntoPlane(PlayerEntity pilot) { PlanePilot = pilot; Plane = new PlaneMotionConstraint(this); TheRegion.PhysicsWorld.Add(Plane); foreach (InternalBaseJoint joint in Joints) // TODO: Just track this detail on the joint itself ffs { if (joint is JointFlyingDisc) { ((FlyingDiscConstraint)((JointFlyingDisc)joint).CurrentJoint).IsAPlane = true; } } }