宁夏网站设计在哪里,企业形象设计课程,青海网站建设系统,网络推广优化能有排名吗在unity5.x中可以使用 Translate来移动某一个游戏对象#xff0c;如下#xff1a;
m_cube.transform.Translate(Vector3.up)
此代码使m_cube向上移动#xff0c;其中#xff0c;vector3.up是向上移动的意思#xff0c;直接可以使用vector3或者vector2调用。
在unity5.x…在unity5.x中可以使用 Translate来移动某一个游戏对象如下
m_cube.transform.Translate(Vector3.up)
此代码使m_cube向上移动其中vector3.up是向上移动的意思直接可以使用vector3或者vector2调用。
在unity5.x中我们可以使用GetComponent来获取到组件如下为添加2d刚体组建
this.gameObject.GetComponentRigidbody2D()
注意尽量少用GetComponent有效率问题。。。