diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Button.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Button.kt deleted file mode 100644 index f647671..0000000 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Button.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.iofferyoutea.WitchQueen - -import com.badlogic.gdx.graphics.Texture -import com.badlogic.gdx.graphics.g2d.BitmapFont -import com.badlogic.gdx.scenes.scene2d.ui.Container -import com.badlogic.gdx.scenes.scene2d.ui.TextButton -import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle -import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable -import ktx.assets.toInternalFile - -open class Button(val upTexturePath: String, val downTexturePath: String, val fontPath: String, val defaultText: String = "New Button", val useDefaultFont: Boolean = true, val fontScale: Float = 1f) { - val buttonText = defaultText - val buttonUp = TextureRegionDrawable(Texture(upTexturePath)) - val buttonDown = TextureRegionDrawable(Texture(downTexturePath)) - val buttonFont = (if (useDefaultFont) BitmapFont() else BitmapFont(fontPath.toInternalFile())).apply { data.scale(fontScale) } - - val buttonStyle = TextButtonStyle().apply { up = buttonUp; down = buttonDown; font = buttonFont } - - val button = TextButton(defaultText, buttonStyle) - val container = Container(button) -} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Client.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Client.kt new file mode 100644 index 0000000..83e779b --- /dev/null +++ b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Client.kt @@ -0,0 +1,6 @@ +package com.iofferyoutea.WitchQueen + +class Client(val hostAddress: String, val hostPort: Int, val playerProfile: PlayerProfile) { + val preparedItems: MutableList = mutableListOf(0, 0, 0, 0) // Item ID. 0 for no item + lateinit var map: Map +} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/GameScreen.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/GameScreen.kt deleted file mode 100644 index 112466d..0000000 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/GameScreen.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.iofferyoutea.WitchQueen - -import ktx.app.KtxScreen -import ktx.app.clearScreen - -class GameScreen(val players: List, val map: Map) : KtxScreen { - override fun render(delta: Float) { - super.render(delta) - clearScreen(0.15f, 0.15f, 0.3f) - } -} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Lobby.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Lobby.kt deleted file mode 100644 index da9cc7c..0000000 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Lobby.kt +++ /dev/null @@ -1,40 +0,0 @@ -package com.iofferyoutea.WitchQueen - -import com.badlogic.gdx.Gdx -import com.badlogic.gdx.Net - -class Lobby { - //val localServers: MutableSetOf = setOf() <-- HashSet? - - //val localPlayer: Player = <-- Should be local player. Has all their items etc. - //val lobby: MutableList = listOf(localPlayer) <-- Limit to lobby size (2)? - - val serverSocket = Gdx.net.newServerSocket( - Net.Protocol.TCP, - "127.0.0.1", - 2864, - null - ) - - val clientSocket = Gdx.net.newClientSocket( - Net.Protocol.TCP, - "127.0.0.1", // <- This should be other servers address - 2864, // <- This should be other servers port - null - ) - - val inputStream = clientSocket.inputStream - - private fun findLocalServer() { - Gdx.app.log("Lobby", "Finding local server...") - - } - - private fun replayHasLocalServer(remoteAddress: String, remotePort: Int) { - Gdx.app.log("Lobby", "Pinged by another client. Informing that we have an open lobby...") - } - - private fun connectToServer(ip: String, port: Int) { // String is the ideal type for ip because v6 uses letters too? - Gdx.app.log("Lobby", "Connecting to $ip on port $port...") - } -} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Main.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Main.kt index 15b420c..6e1ed72 100644 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Main.kt +++ b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Main.kt @@ -14,16 +14,11 @@ import ktx.graphics.use import java.lang.ref.WeakReference class Main : KtxGame() { - //val mainMenu = MainMenu() - //val screenManager = ScreenManager.apply { switchScreen(mainMenu) } - override fun create() { KtxAsync.initiate() -// addScreen(FirstScreen()) -// setScreen() - addScreen(MainMenu()) - setScreen() + addScreen(FirstScreen()) + setScreen() } } diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/MainMenu.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/MainMenu.kt deleted file mode 100644 index 2e8f436..0000000 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/MainMenu.kt +++ /dev/null @@ -1,243 +0,0 @@ -package com.iofferyoutea.WitchQueen - -import com.badlogic.gdx.Gdx -import com.badlogic.gdx.graphics.Texture -import com.badlogic.gdx.graphics.g2d.Batch -import com.badlogic.gdx.graphics.g2d.BitmapFont -import com.badlogic.gdx.graphics.g2d.SpriteBatch -import com.badlogic.gdx.graphics.g3d.ModelCache -import com.badlogic.gdx.scenes.scene2d.InputEvent -import com.badlogic.gdx.scenes.scene2d.Stage -import com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle -import com.badlogic.gdx.scenes.scene2d.ui.Container -import com.badlogic.gdx.scenes.scene2d.ui.HorizontalGroup -import com.badlogic.gdx.scenes.scene2d.ui.ImageButton -import com.badlogic.gdx.scenes.scene2d.ui.Table -import com.badlogic.gdx.scenes.scene2d.ui.TextButton -import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup -import com.badlogic.gdx.scenes.scene2d.utils.ClickListener -import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable -import com.badlogic.gdx.utils.Logger -import com.badlogic.gdx.utils.Scaling -import com.badlogic.gdx.utils.viewport.ScreenViewport -import com.badlogic.gdx.utils.viewport.StretchViewport -import com.badlogic.gdx.utils.viewport.Viewport -import ktx.actors.centerPosition -import ktx.actors.setPosition -import ktx.actors.stage -import ktx.app.KtxScreen -import ktx.app.clearScreen -import javax.swing.text.View - -class MainMenu : KtxScreen { - val myTable = Table().apply { - debug = true - setFillParent(true) - } - val myStage = Stage().apply { - Gdx.input.inputProcessor = this - addActor(myTable) - // We need this to get the size of the table later - //myTable.setSize(viewport.screenWidth.toFloat(), viewport.screenHeight.toFloat()) - } - - //region Map Button - val mapButtonStyle = ImageButton.ImageButtonStyle( - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")) - ) - val mapButton = ImageButton(mapButtonStyle).apply { - myTable.add(this) - myTable.getCell(this) - } - //endregion - - //endregion - //region Player Buttons - // Local Player - // Remote Player - val remotePlayerButton = PlayerButton().apply { - myTable.row() - myTable.add(this.playerGroup) - myTable.getCell(this.playerGroup) // You've got to size the sub actors! - } - - //region Play Buttons - val casualButtonStyle = TextButton.TextButtonStyle( - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default_flipped.png")), - TextureRegionDrawable(Texture("default.png")), - BitmapFont() - ) - val casualButton = TextButton("Casual", casualButtonStyle) - - val competitiveButtonStyle = TextButton.TextButtonStyle( - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - BitmapFont() - ) - val competitiveButton = TextButton("Competitive", competitiveButtonStyle) - - // We need to wrap the play buttons in a group so they only take up 1 column - val playButtonGroup = HorizontalGroup().apply { - addActor(casualButton) - addActor(competitiveButton) - myTable.row() - myTable.add(this) - myTable.getCell(this) - } - //endregion - - private fun update(delta: Float) { - if (casualButton.isPressed) { - Gdx.app.log("MainMenu", "Casual Button Pressed!") - } - } - - override fun render(delta: Float) { - clearScreen(0.3f, 0.3f, 0.3f) - - myStage.act(delta) - myStage.draw() - - update(delta) - } - - override fun dispose() { - myStage.dispose() - } -} - -//class MainMenu : KtxScreen { -// val viewport = ScreenViewport().apply { -// -// } -// -// val table = Table().apply { -// setFillParent(true) -// debug = true -// } -// val stage = Stage(viewport).apply { -// Gdx.app.log("WitchQueen", "Width: " + viewport.screenWidth.toString() + " Height: " + viewport.screenHeight.toString()) -// -// Gdx.input.inputProcessor = this -// addActor(table) -// } -// -// // Map Selection Button -// -// // Player Table -//// val inviteButton = Button( -//// "default.png", -//// "default_flipped.png", -//// "", -//// "Invite Player", -//// true, -//// 2f -//// ).apply { -//// table.add(this.button).size(1024f, 512f) -//// table.row() -//// } -// -// // Invite Player Button -// val playerPlaceholderButtonUp = TextureRegionDrawable(Texture("player-frame-up.png")) -// val playerPlaceholderButtonDown = TextureRegionDrawable(Texture("player-frame-down.png")) -// val playerPlaceholderButtonChecked = TextureRegionDrawable(Texture("player-frame-up.png")) -// val playerPlaceholderButtonStyle = ImageButton.ImageButtonStyle() -// .apply { up = playerPlaceholderButtonUp; down = playerPlaceholderButtonDown; checked = playerPlaceholderButtonChecked } -// val playerPlaceholderButton = ImageButton(playerPlaceholderButtonStyle) -// val playerPlaceholderContainer = Container(playerPlaceholderButton).apply { -// width(viewport.screenWidth * 0.8f) -// height(((viewport.screenWidth * 0.8f) * 9f) / 32f) // container.width is 0. We need to work out the width again. -// padLeft(0f) -// } -// -// val player1TableButton = PlayerTableButton().apply { // These should only be collections no t buttons? -// container.width(viewport.screenWidth * 0.8f) -// container.height(500f) -// //container.height(((viewport.screenWidth * 0.8f) * 9f) / 32f) // container.width is 0. We need to work out the width again. -// container.padLeft(0f) -// } -// val player2TableButton = PlayerTableButton() // Since the collection contains the buttons we need anyway? -// val playerTableButtonCollection = VerticalGroup().apply { -// addActor(player1TableButton.container) -// addActor(playerPlaceholderContainer) -// table.add(this) -// table.row() -// } -// -// // Casual Button -// val casualButton = Button( -// "default.png", -// "default_flipped.png", -// "", -// "Casual", -// true, -// 2f -// ).apply { // Could probably do this in Button. Just take in width and aspect ratio and padding? -// container.width(viewport.screenWidth * 0.375f) -// container.height(((viewport.screenWidth * 0.375f) * 3f) / 4) // container.width is 0. We need to work out the width again. -// container.padLeft(viewport.screenWidth * 0.1f) -// } -// -// // Competitive Button -// val competitiveButton = Button( -// "default.png", -// "default_flipped.png", -// "", -// "Competitive", -// true, -// 2f -// ).apply { -// container.width(viewport.screenWidth * 0.375f) -// container.height(((viewport.screenWidth * 0.375f) * 3f) / 4) // container.width is 0. We need to work out the width again. -// container.padLeft(viewport.screenWidth * 0.05f) -// } -// -// val playButtonGroup = HorizontalGroup().apply { -// addActor(casualButton.container) -// addActor(competitiveButton.container) -// -// table.add(this).width(viewport.screenWidth.toFloat()) -// } -// -// // Methods -// private fun processInput() { -// casualButton.button.addListener(object : ClickListener() { -// override fun touchUp( -// event: InputEvent?, -// x: Float, -// y: Float, -// pointer: Int, -// button: Int -// ) { -// Gdx.app.log("My Project", "Clicked!") -// //setScreen() -// } -// }) -// } -// -// override fun resize(width: Int, height: Int) { -// super.resize(width, height) -// stage.viewport.update(width, height, true) -// } -// -// override fun render(delta: Float) { -// super.render(delta) -// clearScreen(0f, 255f, 0f) -// -// processInput() -// -// stage.act(delta) -// stage.draw() -// } -// -// override fun dispose() { -// stage.dispose() -// } -//} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Map.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Map.kt index 51190f9..0879e37 100644 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Map.kt +++ b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Map.kt @@ -1,4 +1,6 @@ package com.iofferyoutea.WitchQueen -class Map { +class Map(val mapType: MapType) { + val rooms = Array(2) { Array(2) { Room.new } } // We use an array instead of list i think + } diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/MapType.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/MapType.kt new file mode 100644 index 0000000..4f7be20 --- /dev/null +++ b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/MapType.kt @@ -0,0 +1,5 @@ +package com.iofferyoutea.WitchQueen + +enum class MapType { + DUNGEON, STREETS +} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Player.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Player.kt index da57cfe..1368769 100644 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Player.kt +++ b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Player.kt @@ -1,5 +1,10 @@ package com.iofferyoutea.WitchQueen -class Player { - val name = String() +enum class PlayerState { + IDLE, LOOTING, FIGHTING +} + +class Player(val map: Map) { + var currentState = PlayerState.IDLE + val currentRoom } diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerButton.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerButton.kt deleted file mode 100644 index 3d623e9..0000000 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerButton.kt +++ /dev/null @@ -1,109 +0,0 @@ -package com.iofferyoutea.WitchQueen - -import com.badlogic.gdx.graphics.Color -import com.badlogic.gdx.graphics.Texture -import com.badlogic.gdx.graphics.g2d.BitmapFont -import com.badlogic.gdx.scenes.scene2d.ui.Container -import com.badlogic.gdx.scenes.scene2d.ui.HorizontalGroup -import com.badlogic.gdx.scenes.scene2d.ui.ImageButton -import com.badlogic.gdx.scenes.scene2d.ui.Label -import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup -import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable - -class PlayerButton { - enum class STATE { EMPTY, CONNECTING, FILLED } - - // Player Profile - val profileButtonStyle = ImageButton.ImageButtonStyle( - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")) - ) - val profileButton = ImageButton(profileButtonStyle) - - // Player Username - val usernameStyle = Label.LabelStyle(BitmapFont(), Color.BLACK) - val username = Label("default", usernameStyle) - - //region Player Items - val item1ButtonStyle = ImageButton.ImageButtonStyle( - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")) - ) - val item1Button = ImageButton(item1ButtonStyle) - val item2ButtonStyle = ImageButton.ImageButtonStyle( - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")) - ) - val item2Button = ImageButton(item2ButtonStyle) - val item3ButtonStyle = ImageButton.ImageButtonStyle( - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")) - ) - val item3Button = ImageButton(item3ButtonStyle) - val item4ButtonStyle = ImageButton.ImageButtonStyle( - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")) - ) - val item4Button = ImageButton(item4ButtonStyle) - //endregion - - // Leave Lobby - Only shows for local player on local player's button - val leaveButtonStyle = ImageButton.ImageButtonStyle( - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")) - ) - val leaveButton = ImageButton(leaveButtonStyle) - - // Kick Player - Only shows for local player on remote player's button - val kickButtonStyle = ImageButton.ImageButtonStyle( - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")), - TextureRegionDrawable(Texture("default.png")) - ) - val kickButton = ImageButton(kickButtonStyle) - - val itemGroup = HorizontalGroup().apply { - addActor(item1Button) - addActor(item2Button) - addActor(item3Button) - addActor(item4Button) - } - - val nameAndItemGroup = VerticalGroup().apply { - addActor(username) - addActor(itemGroup) - } - - val playerGroup = HorizontalGroup().apply { - addActor(profileButton) - addActor(nameAndItemGroup) - addActor(kickButton) - } -} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerProfile.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerProfile.kt new file mode 100644 index 0000000..afc5067 --- /dev/null +++ b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerProfile.kt @@ -0,0 +1,7 @@ +package com.iofferyoutea.WitchQueen + +class PlayerProfile { + var iconPath = "default.png" + var username = "Default" + val availableItems: MutableList = mutableListOf() // Use Item IDs? +} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerTableButton.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerTableButton.kt deleted file mode 100644 index 9348964..0000000 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerTableButton.kt +++ /dev/null @@ -1,65 +0,0 @@ -package com.iofferyoutea.WitchQueen - -import com.badlogic.gdx.graphics.Color -import com.badlogic.gdx.graphics.Texture -import com.badlogic.gdx.graphics.g2d.BitmapFont -import com.badlogic.gdx.scenes.scene2d.ui.Button -import com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle -import com.badlogic.gdx.scenes.scene2d.ui.Container -import com.badlogic.gdx.scenes.scene2d.ui.HorizontalGroup -import com.badlogic.gdx.scenes.scene2d.ui.Image -import com.badlogic.gdx.scenes.scene2d.ui.Label -import com.badlogic.gdx.scenes.scene2d.ui.Table -import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup -import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable -import ktx.assets.toInternalFile - -class PlayerTableButton(val playerIconPath: String = "default.png", val newPlayerName: String = "PLAYER"): - Table() { - val playerIcon = Image(Texture(playerIconPath)) - val playerNameStyle = Label.LabelStyle(BitmapFont("default.fnt".toInternalFile()), Color.WHITE) - val playerName = Label(newPlayerName, playerNameStyle) - // Change preparedItems and kickButton into actual buttons - var preparedItems: MutableList = mutableListOf( // We should use libGDX scene2d.ui List? - Image(Texture("prepared-item-frame.png")), - Image(Texture("prepared-item-frame.png")), - Image(Texture("prepared-item-frame.png")), - Image(Texture("prepared-item-frame.png")) - ) - val preparedItemsGroup = HorizontalGroup().apply { - for (item in preparedItems) addActor(item) - } - val kickButton = Image(Texture("red-x.png")) - - // Sub-table for Player/Items stack - Use VerticalGroup instead -// val playerPlusItemsStack = Table().apply { -// add(playerName) -// row() -// for (item in preparedItems) add(item) -// } - val playerLabelPlusItemsGroup = VerticalGroup().apply { - addActor(playerName) - addActor(preparedItemsGroup) - } - - // Sub-table for the contents of the PlayerTableButton - Use HorizontalGroup instead -// val subTable = Table().apply { -// add(playerName, playerPlusItemsStack, kickButton) -// } - val componentCollection = HorizontalGroup().apply { - addActor(playerIcon) - addActor(playerLabelPlusItemsGroup) - addActor(kickButton) - } - - // Base Button stuff - val buttonUp = TextureRegionDrawable(Texture("transparent.png")) - val buttonDown = TextureRegionDrawable(Texture("transparent.png")) - val buttonChecked = TextureRegionDrawable(Texture("transparent.png")) - - val buttonStyle = ButtonStyle().apply { up = buttonUp; down = buttonDown; checked = buttonChecked } - - val button = Button(componentCollection, buttonStyle) - - val container = Container(componentCollection) -} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerTablePlaceholderButton.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerTablePlaceholderButton.kt deleted file mode 100644 index bc996f6..0000000 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/PlayerTablePlaceholderButton.kt +++ /dev/null @@ -1,4 +0,0 @@ -package com.iofferyoutea.WitchQueen - -class PlayerTablePlaceholderButton { -} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Room.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Room.kt new file mode 100644 index 0000000..4904624 --- /dev/null +++ b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/Room.kt @@ -0,0 +1,12 @@ +package com.iofferyoutea.WitchQueen + +enum class RoomActivity { + EMPTY, LOOT, FIGHT +} + +class Room(val mapType: MapType) { + var availableActivities: MutableList = mutableListOf() + init { + // Generate Room in this init block! + } +} diff --git a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/ScreenManager.kt b/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/ScreenManager.kt deleted file mode 100644 index 19d5151..0000000 --- a/WitchQueen/core/src/main/kotlin/com/iofferyoutea/WitchQueen/ScreenManager.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.iofferyoutea.WitchQueen - -import com.badlogic.gdx.Gdx -import kotlinx.coroutines.* -import ktx.app.KtxScreen -import java.lang.ref.WeakReference - -object ScreenManager { - var currentScreen: WeakReference? = null - val screens: MutableSet> = mutableSetOf>() // Does this need to be mutable? - - fun switchScreen(newScreen: WeakReference): Boolean { - if (!screens.contains(newScreen)) { - Gdx.app.log("ScreenManager", "newScreen not found in screens. Adding...") - screens.add(newScreen) - } - - currentScreen = screens.find { it == newScreen } - - return currentScreen != null - } -}