mirror of
https://github.com/knight0zh/aoi.git
synced 2026-02-04 08:41:36 +08:00
13 lines
264 B
Go
13 lines
264 B
Go
package aoi
|
|
|
|
type AOI interface {
|
|
Add(entity *Entity) // 添加实体
|
|
Delete(entity *Entity) // 移除实体
|
|
Search(entity *Entity) (result []*Entity) // 范围查询
|
|
}
|
|
|
|
type Entity struct {
|
|
X, Y float64
|
|
Name string
|
|
}
|