Editor Map don't display
This commit is contained in:
parent
031815e055
commit
3b55678835
|
@ -36,11 +36,11 @@ class GMap(val raw: RawMap) {
|
||||||
|
|
||||||
def getHeight: Int = height
|
def getHeight: Int = height
|
||||||
|
|
||||||
def getCase(x: Int, y: Int): Case = casesMap.getOrElse(x, Map())(y)
|
def getCase(x: Int, y: Int): Case = casesMap.getOrElse(x, Map()).getOrElse(y, null)
|
||||||
|
|
||||||
def getAllCases: List[Case] = {
|
def getAllCases: List[Case] = {
|
||||||
val list = Nil: List[Case]
|
var list = Nil: List[Case]
|
||||||
casesMap.values.foreach(l => list.appendedAll(l.values))
|
casesMap.values.foreach(l => list = list.appendedAll(l.values))
|
||||||
list
|
list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ class MapMouseListener(val panel: MapPanel, val frame: EditorFrame) extends Mous
|
||||||
|
|
||||||
case _ =>
|
case _ =>
|
||||||
n = c
|
n = c
|
||||||
|
|
||||||
}
|
}
|
||||||
map.setCase(n.getPosX, n.getPosY, n)
|
map.setCase(n.getPosX, n.getPosY, n)
|
||||||
panel.repaint()
|
panel.repaint()
|
||||||
|
|
Loading…
Reference in New Issue