コード例 #1
0
ファイル: PrismaticJoint.cs プロジェクト: pabllopf/Alis
 /// <summary>
 ///     Set the joint limits, usually in meters.
 /// </summary>
 public void SetLimits(float lower, float upper)
 {
     Box2DxDebug.Assert(lower <= upper);
     Body1.WakeUp();
     Body2.WakeUp();
     LowerLimit = lower;
     UpperLimit = upper;
 }
コード例 #2
0
        /// <summary>
        ///     Use this to update the target point.
        /// </summary>
        public void SetTarget(Vec2 target)
        {
            if (Body2.IsSleeping())
            {
                Body2.WakeUp();
            }

            Target = target;
        }
コード例 #3
0
ファイル: PrismaticJoint.cs プロジェクト: pabllopf/Alis
 /// <summary>
 ///     Set the maximum motor force, usually in N.
 /// </summary>
 public void SetMaxMotorForce(float force)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     MaxMotorForce = Settings.FORCE_SCALE(1.0f) * force;
 }
コード例 #4
0
ファイル: PrismaticJoint.cs プロジェクト: pabllopf/Alis
 /// <summary>
 ///     Enable/disable the joint motor.
 /// </summary>
 public void EnableMotor(bool flag)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     IsMotorEnabled = flag;
 }
コード例 #5
0
ファイル: PrismaticJoint.cs プロジェクト: pabllopf/Alis
 /// <summary>
 ///     Enable/disable the joint limit.
 /// </summary>
 public void EnableLimit(bool flag)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     IsLimitEnabled = flag;
 }
コード例 #6
0
 /// <summary>
 ///     Set the motor speed, usually in meters per second.
 /// </summary>
 public void SetMotorSpeed(float speed)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     MotorSpeed = speed;
 }
コード例 #7
0
 /// <summary>
 ///     Enable/disable the joint motor.
 /// </summary>
 public void EnableMotor(bool flag)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     EnableMotorx = flag;
 }
コード例 #8
0
 /// <summary>
 ///     Enable/disable the joint limit.
 /// </summary>
 public void EnableLimit(bool flag)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     EnableLimitx = flag;
 }
コード例 #9
0
 /// <summary>
 ///     Set the maximum motor torque, usually in N-m.
 /// </summary>
 public void SetMaxMotorTorque(float torque)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     MaxMotorTorque = torque;
 }