2d位置接口抽离,添加3d位置接口
This commit is contained in:
parent
b985fef3e3
commit
fada9ce67a
|
@ -4,8 +4,7 @@ package game
|
|||
// - AOI 对象提供了 AOI 系统中常用的属性,诸如位置坐标和视野范围等
|
||||
type AOIEntity2D interface {
|
||||
Actor
|
||||
// GetPosition 获取对象位置
|
||||
GetPosition() (x, y float64)
|
||||
Position2D
|
||||
// GetVision 获取视距
|
||||
GetVision() float64
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
package game
|
||||
|
||||
// Position2D 2D位置接口定义
|
||||
type Position2D interface {
|
||||
// GetPosition 获取对象位置
|
||||
GetPosition() (x, y float64)
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package game
|
||||
|
||||
type Position3D interface {
|
||||
GetPosition() (x, y, z float64)
|
||||
}
|
Loading…
Reference in New Issue