宁波模板建站定制,建设兼职网站目的,怎么建设淘宝网站,做电影网站投资多少钱在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有效率问题。。。