remove collisiongrid, it doesnt belongs to this project
This commit is contained in:
@@ -29,8 +29,6 @@ type Data struct {
|
|||||||
Monsters Monsters
|
Monsters Monsters
|
||||||
Corpses Monsters
|
Corpses Monsters
|
||||||
Game OnlineGame
|
Game OnlineGame
|
||||||
// First slice represents X and second Y
|
|
||||||
CollisionGrid [][]bool
|
|
||||||
PlayerUnit PlayerUnit
|
PlayerUnit PlayerUnit
|
||||||
NPCs NPCs
|
NPCs NPCs
|
||||||
Inventory Inventory
|
Inventory Inventory
|
||||||
@@ -85,23 +83,6 @@ func (r Room) IsInside(p Position) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r Room) GetWalkableTiles(d Data, room Room) []Position {
|
|
||||||
var walkableTiles []Position
|
|
||||||
|
|
||||||
for x := room.X; x < room.X+room.Width; x++ {
|
|
||||||
for y := room.Y; y < room.Y+room.Height; y++ {
|
|
||||||
if d.CollisionGrid[x][y] {
|
|
||||||
walkableTiles = append(walkableTiles, Position{
|
|
||||||
X: x,
|
|
||||||
Y: y,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return walkableTiles
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d Data) MercHPPercent() int {
|
func (d Data) MercHPPercent() int {
|
||||||
for _, m := range d.Monsters {
|
for _, m := range d.Monsters {
|
||||||
if m.IsMerc() {
|
if m.IsMerc() {
|
||||||
|
|||||||
Reference in New Issue
Block a user