GameWorld: adding "worldIndex"; more save/load stuffs

This commit is contained in:
minjaesong
2018-10-03 23:15:24 +09:00
parent b380fa7ce7
commit 071dc85b94
14 changed files with 1301 additions and 58 deletions

View File

@@ -231,7 +231,8 @@ open class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
// init map as chosen size
gameworld = GameWorldExtension(worldParams.width, worldParams.height)
gameworld = GameWorldExtension(1, worldParams.width, worldParams.height)
gameworldCount++
world = gameworld as GameWorld
// generate terrain for the map

View File

@@ -7,7 +7,7 @@ import kotlin.properties.Delegates
/**
* Created by minjaesong on 2018-07-03.
*/
class GameWorldExtension(width: Int, height: Int): GameWorld(width, height) {
class GameWorldExtension(worldIndex: Int, width: Int, height: Int): GameWorld(worldIndex, width, height) {
val time: WorldTime
val economy = GameEconomy()