学员(7715)
课程(185)
分享
rigidbody2d = GetComponent<Rigidbody2D>();
collider = this.GetComponent<BoxCollider2D>();
这两个有什么区别,同样是得到挂在自身上面的组件,如果加了this和不加this有什么区别?
没有区别。
http://www.cnblogs.com/jh007/p/6120654.html
没有区别 加了this给提示