remove noisy logs

main
Matthias 2 years ago
parent f768723d88
commit f6a7cfaafb

@ -497,7 +497,7 @@
<point/> <point/>
</object> </object>
</objectgroup> </objectgroup>
<objectgroup id="12" name="SFX" visible="0"> <objectgroup id="12" name="SFX">
<object id="6" x="1536" y="3008" width="384" height="704"> <object id="6" x="1536" y="3008" width="384" height="704">
<properties> <properties>
<property name="ground" value="indoor"/> <property name="ground" value="indoor"/>

@ -17,7 +17,6 @@ public class SoundEngine {
if (gameSound is GameSoundEffect) { if (gameSound is GameSoundEffect) {
val sound = loadEffect(gameSound.name) val sound = loadEffect(gameSound.name)
sound.play(volume) sound.play(volume)
println("Playing sound ${gameSound.name}")
} else if (gameSound is GameMusic) { } else if (gameSound is GameMusic) {
backgroundMusic = loadMusic(gameSound.name) backgroundMusic = loadMusic(gameSound.name)
backgroundMusic.volume = volume backgroundMusic.volume = volume

@ -1,23 +1,19 @@
package com.last.commit.map package com.last.commit.map
import GameState
import com.badlogic.gdx.Gdx import com.badlogic.gdx.Gdx
import com.badlogic.gdx.graphics.OrthographicCamera import com.badlogic.gdx.graphics.OrthographicCamera
import com.badlogic.gdx.graphics.g2d.SpriteBatch import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.maps.objects.RectangleMapObject
import com.badlogic.gdx.maps.tiled.TiledMap import com.badlogic.gdx.maps.tiled.TiledMap
import com.badlogic.gdx.maps.tiled.TiledMapTileLayer
import com.badlogic.gdx.maps.tiled.TmxMapLoader import com.badlogic.gdx.maps.tiled.TmxMapLoader
import com.badlogic.gdx.maps.tiled.renderers.OrthogonalTiledMapRenderer import com.badlogic.gdx.maps.tiled.renderers.OrthogonalTiledMapRenderer
import com.badlogic.gdx.math.Rectangle import com.badlogic.gdx.math.Rectangle
import com.badlogic.gdx.math.Vector2 import com.badlogic.gdx.math.Vector2
import com.badlogic.gdx.utils.Array
import com.badlogic.gdx.scenes.scene2d.ui.Image import com.badlogic.gdx.scenes.scene2d.ui.Image
import com.last.commit.Collidable import com.last.commit.Collidable
import com.last.commit.Player import com.last.commit.Player
import com.last.commit.Wall
import com.last.commit.audio.GameSoundEffect import com.last.commit.audio.GameSoundEffect
import com.last.commit.inventory.InventoryItemTextureLoader import com.last.commit.inventory.InventoryItemTextureLoader
import GameState
class TimeMap(fileName: String, val state: GameState) { class TimeMap(fileName: String, val state: GameState) {
@ -120,7 +116,6 @@ class TimeMap(fileName: String, val state: GameState) {
fun interactWith(x: Float, y: Float, blockingCollider: Rectangle) { fun interactWith(x: Float, y: Float, blockingCollider: Rectangle) {
val gridX = x.toInt() / CELL_SIZE val gridX = x.toInt() / CELL_SIZE
val gridY = y.toInt() / CELL_SIZE val gridY = y.toInt() / CELL_SIZE
println("Interacting with element at $gridX:$gridY")
//if no door is found return //if no door is found return
val interactable: Interactable = this.findInteractableAtPosition(gridX, gridY) ?: return val interactable: Interactable = this.findInteractableAtPosition(gridX, gridY) ?: return

@ -1,7 +1,6 @@
package com.last.commit.screen package com.last.commit.screen
import com.badlogic.gdx.Gdx import com.badlogic.gdx.Gdx
import com.badlogic.gdx.Input
import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.GL20 import com.badlogic.gdx.graphics.GL20
import com.badlogic.gdx.graphics.OrthographicCamera import com.badlogic.gdx.graphics.OrthographicCamera
@ -65,18 +64,20 @@ class FirstScreen(private val parent: Game) : TimeTravelScreen() {
gameState.soundEngine.play(GameMusic.WORLD_MUSIC, 0.25f) gameState.soundEngine.play(GameMusic.WORLD_MUSIC, 0.25f)
} }
override fun handleKeyInput(action: ActionCommand) { override fun handleKeyInput(action: ActionCommand) {
if (!pause) { if (!pause) {
when (action) { when (action) {
ActionCommand.INTERACT -> { ActionCommand.INTERACT -> {
openDoor() openDoor()
} }
ActionCommand.TIME_TRAVEL -> { ActionCommand.TIME_TRAVEL -> {
map.teleport(player) map.teleport(player)
} }
else -> {} else -> {}
} }
println(action)
if (action == ActionCommand.OPEN_MENU) { if (action == ActionCommand.OPEN_MENU) {
//Gdx.app.exit() //Gdx.app.exit()
parent.changeScreen(Screens.MAIN_MENU) parent.changeScreen(Screens.MAIN_MENU)
@ -89,10 +90,8 @@ class FirstScreen(private val parent: Game) : TimeTravelScreen() {
if (!pause) { if (!pause) {
val mouseCoordinates: Vector2 = toWorldCoordinates(screenX.toFloat(), screenY.toFloat()) val mouseCoordinates: Vector2 = toWorldCoordinates(screenX.toFloat(), screenY.toFloat())
println("Mouse World coordinates is ${mouseCoordinates.x}:${mouseCoordinates.y}")
val playerDirection: Vector2 = player.getAbsoluteDirection() val playerDirection: Vector2 = player.getAbsoluteDirection()
println("Player interactor is ${playerDirection.x}:${playerDirection.y}")
map.interactWith(playerDirection.x, playerDirection.y, player.getCollider()) map.interactWith(playerDirection.x, playerDirection.y, player.getCollider())
} }
} }
@ -295,7 +294,6 @@ class FirstScreen(private val parent: Game) : TimeTravelScreen() {
fun openDoor() { fun openDoor() {
println("Attempt to toggle door") println("Attempt to toggle door")
val playerDirection: Vector2 = player.getAbsoluteDirection() val playerDirection: Vector2 = player.getAbsoluteDirection()
println("Player interactor is ${playerDirection.x}:${playerDirection.y}")
map.interactWith(playerDirection.x, playerDirection.y, player.getCollider()) map.interactWith(playerDirection.x, playerDirection.y, player.getCollider())
} }

Loading…
Cancel
Save