Golang游戏 图像旋转模拟运动 (ebiten)
运动效果首先为Ebiten GeoM结构体(github.com\hajimehoshi\ebiten\v2@v2.0.7\geom.go)添加了一个可以旋转旋转中心的方法//(x,y)为旋转中心坐标 // theta 为旋转角度,弧度制func (g *GeoM) RotateByPoint(x, y, theta float64) { if theta == 0 { return } sin, cos := math.Sincos(theta) _tx, _ty := g.tx-x