待实现的地形及寻路

This commit is contained in:
kercylan98 2023-05-26 10:12:00 +08:00
parent 84c8cefea9
commit 005586b64a
3 changed files with 21 additions and 0 deletions

3
component/navigation.go Normal file
View File

@ -0,0 +1,3 @@
package component
// TODO

9
game/terrain_2d.go Normal file
View File

@ -0,0 +1,9 @@
package game
// Terrain2D 地形
type Terrain2D interface {
GetBlock(x, y int) Terrain2DBlock
GetBlocks() [][]Terrain2DBlock
GetWidth() int
GetHeight() int
}

9
game/terrain_2d_block.go Normal file
View File

@ -0,0 +1,9 @@
package game
// Terrain2DBlock 地形块
type Terrain2DBlock interface {
// GetTerrain 获取归属的地形
GetTerrain() Terrain2D
// GetCost 获取移动消耗
GetCost() float64
}