文件名称:mousejoint

  • 所属分类:
  • android开发
  • 资源属性:
  • [Android] [Java] [源码]
  • 上传时间:
  • 2014-04-16
  • 文件大小:
  • 338kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • rpu****
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

Android (鼠标关节-拖拽Body)

  // 鼠标关节

  public MouseJoint createMouseJoint() {

  MouseJointDef mjd = new MouseJointDef()

  //设置鼠标关节的第一个Body实例(默认使用接地Body)

  mjd.body1 = world.getGroundBody()

  //设置鼠标关节的第二个Body实例(被拖拽的Body)

  mjd.body2 = body1

  //设置目标点的X坐标

  mjd.target.x = body1.getPosition().x

  //设置目标点的Y坐标

  mjd.target.y = body1.getPosition().y

  // body1.allowSleeping(false) //设置body1永不休眠

  // 设置鼠标关节的目标位置

  mjd.maxForce = 100 // 拉力

  //由World来创建鼠标关节

  MouseJoint mj = (MouseJoint) world.createJoint(mjd)

  return mj

  }-Android (mouse joints- Drag Body)// mouse joint public MouseJoint createMouseJoint () {MouseJointDef mjd = new MouseJointDef () // set the mouse joints first Body instance (default grounding Body) mjd.body1 = world. getGroundBody () // set the mouse joint second Body instance (being dragged Body) mjd.body2 = body1 // Set the target point X coordinate mjd.target.x = body1.getPosition () x. // Set the Y coordinate of the target point mjd.target.y = body1.getPosition () y .// body1.allowSleeping (false) //set body1 Never Sleep// set the mouse joint target location mjd.maxForce = 100 //Rally// Create the World Mouse joint MouseJoint mj = (MouseJoint) world.createJoint (mjd) return mj }
(系统自动生成,下载前可以参看下载内容)

下载文件列表





(鼠标关节-拖拽Body)\CreateMouseJoint\.classpath

...................\................\.project

...................\................\AndroidManifest.xml

...................\................\bin\classes.dex

...................\................\...\.om\mj\MainActivity.class

...................\................\...\...\..\MyRect.class

...................\................\...\...\..\MySurfaceView.class

...................\................\...\...\..\R$attr.class

...................\................\...\...\..\R$drawable.class

...................\................\...\...\..\R$id.class

...................\................\...\...\..\R$layout.class

...................\................\...\...\..\R$string.class

...................\................\...\...\..\R.class

...................\................\...\CreateMouseJoint.apk

...................\................\...\resources.ap_

...................\................\default.properties

...................\................\gen\com\mj\R.java

...................\................\lib\jbox2d.jar

...................\................\proguard.cfg

...................\................\res\drawable-hdpi\icon.png

...................\................\...\.........ldpi\icon.png

...................\................\...\.........mdpi\icon.png

...................\................\...\layout\main.xml

...................\................\...\values\strings.xml

...................\................\src\com\mj\MainActivity.java

...................\................\...\...\..\MyRect.java

...................\................\...\...\..\MySurfaceView.java

...................\................\bin\com\mj

...................\................\gen\com\mj

...................\................\src\com\mj

...................\................\bin\com

...................\................\gen\com

...................\................\res\drawable-hdpi

...................\................\...\drawable-ldpi

...................\................\...\drawable-mdpi

...................\................\...\layout

...................\................\...\values

...................\................\src\com

...................\................\assets

...................\................\bin

...................\................\gen

...................\................\lib

...................\................\res

...................\................\src

...................\CreateMouseJoint

(鼠标关节-拖拽Body)

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org