1
0
mirror of https://github.com/ynerant/Level-Editor.git synced 2025-07-03 06:12:47 +02:00

Project can be launched through sbt run, project is now fully translated

This commit is contained in:
Yohann D'ANELLO
2020-04-05 01:15:45 +02:00
parent 8b745c068a
commit 48eb15d57e
8 changed files with 84 additions and 11 deletions

View File

@ -1,3 +0,0 @@
Manifest-Version: 1.0
Main-Class: fr.ynerant.leveleditor.client.main.Main

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration package="log4j.test" status="info">
<Loggers>
<Root level="info">
</Root>
</Loggers>
</Configuration>

View File

@ -38,7 +38,9 @@ object SpriteRegister {
val name = je.getName
if (name.startsWith("assets/")) {
val f = new File(name)
if (name.endsWith("/")) if (!f.mkdirs && !f.isDirectory) throw new IOException("Unable to make dir: " + f)
if (name.endsWith("/")) {
if (!f.mkdirs && !f.isDirectory) throw new IOException("Unable to make dir: " + f)
}
else if (!f.isFile) Files.copy(jar.getInputStream(je), Paths.get(f.toURI))
}
}

View File

@ -149,6 +149,7 @@ class GameFrame(val map: RawMap) extends JFrame("Jeu") {
val y = event.getY / 32
val tower = if (basicTower.isSelected) new BasicTower(x, y)
else if (nullTower.isSelected) new NullTower(x, y)
else if (autoTower.isSelected) new AutoTower(x, y)
else null
if (tower == null || tower.getPrice > reward) return