示例#1
0
文件: chipmunk.go 项目: andrebq/exp
func (s *Space) SetGravity(g Vect) {
	C.cpSpaceSetGravity(s.s, C.cpVect(g))
}
示例#2
0
// SetGravity sets the gravity to pass to rigid bodies when integrating velocity.
func (s *Space) SetGravity(g Vect) {
	C.cpSpaceSetGravity(s.c(), g.c())
}
示例#3
0
// Set the gravity to pass to rigid bodies when integrating velocity.
func (s *Space) SetGravity(x float64, y float64) {
	C.cpSpaceSetGravity(s.ptr, C.cpVect{C.cpFloat(x), C.cpFloat(y)})
}