resolve conflicts

This commit is contained in:
anton.gurov
2019-11-05 12:42:05 +03:00
33 changed files with 1004 additions and 360 deletions

View File

@ -8,7 +8,7 @@ import (
//fixme move to config
var mapWidth = 150
var mapHeight = 100
var mapHeight = 90
type Level struct {
@ -17,7 +17,7 @@ type Level struct {
Name string
Branch string
Depth int
Objects []ecs.Entity
Objects *[]ecs.Entity
Tiles []*Tile
}
@ -49,6 +49,7 @@ func (l *Level) Put (x, y int, tileFunc interface{}) {
func NewLevel(ctx util.ClientCtx, branch string, depth int) *Level {
l := &Level{
ctx: ctx,
Name: branch + string(depth),
Depth: depth,
Rect: types.NewRect(0,0, mapWidth, mapHeight),
@ -58,6 +59,12 @@ func NewLevel(ctx util.ClientCtx, branch string, depth int) *Level {
return l
}
func (l *Level) SetAllInvisible() {
for idx, _ := range l.Tiles {
l.Tiles[idx].Visible = false
}
}
type Room struct {
*types.Rect
Center types.Coords