// Path: core/src/com/alexaut/kroniax/game/level/LevelProperties.java
// public class LevelProperties {
//     // Map Properties
//     public Vector2 tileSize;
//     public Vector2 size;
//     public Vector2 tileCount;
// 
//     public Vector2 spawn;
//     public float velocity;
//     public float gravity;
// 
//     public boolean fixedCamera;
// 
//     public LevelProperties(TileMap level) throws Exception {
//         parseMapDetails(level.getProperties());
// 
//         checkEssentialValues();
//     }
// 
//     private void parseMapDetails(Properties props) {
//         // Search tilesize
//         tileSize = new Vector2(props.get("tilewidth"), props.get("tileheight"));
//         tileCount = new Vector2(props.get("width"), props.get("height"));
//         size = new Vector2(tileCount.x * tileSize.x, tileCount.y * tileSize.y);
//         // Spawn
//         if (props.hasProperty("spawn_x")) {
//             float spawn_x = props.get("spawn_x") * tileSize.x;
//             if (spawn == null)
//                 spawn = new Vector2(spawn_x, 0);
//             else
//                 spawn.x = spawn_x;
//         }
//         if (props.hasProperty("spawn_y")) {
//             float spawn_y = (tileCount.y - props.get("spawn_y")) * tileSize.y;
//             if (spawn == null)
//                 spawn = new Vector2(0, spawn_y);
//             else
//                 spawn.y = spawn_y;
//         }
//         if (props.hasProperty("gravity"))
//             gravity = props.get("gravity");
//         else
//             gravity = 100.f;
//         if (props.hasProperty("velocity"))
//             velocity = props.get("velocity");
//         else
//             velocity = 300;
// 
//         fixedCamera = props.hasProperty("fixed_camera");
//     }
// 
//     private void checkEssentialValues() throws Exception {
//         if (spawn == null)
//             throw new Exception("spawn_x and/or spawn_y are missing, they should be properties of a layer");
//     }
// 
// }


import com.alexaut.kroniax.game.level.LevelProperties;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.math.Vector2;

package com.alexaut.kroniax.game.player;


public class Player {

    private Vector2 mPosition;
    private Vector2 mSize;

    private Vector2 mVelocity;
    private float mGravity;

    private PlayerShip mShip;
    private PlayerScriptTimer mScriptTimers;

    private Vector2 mCachePosition;
    private Vector2 mCacheSize;
    private Vector2 mCacheVelocity;
    private float mCacheGravity;


// Path: core/src/com/alexaut/kroniax/game/level/LevelProperties.java
// public class LevelProperties {
//     // Map Properties
//     public Vector2 tileSize;
//     public Vector2 size;
//     public Vector2 tileCount;
// 
//     public Vector2 spawn;
//     public float velocity;
//     public float gravity;
// 
//     public boolean fixedCamera;
// 
//     public LevelProperties(TileMap level) throws Exception {
//         parseMapDetails(level.getProperties());
// 
//         checkEssentialValues();
//     }
// 
//     private void parseMapDetails(Properties props) {
//         // Search tilesize
//         tileSize = new Vector2(props.get("tilewidth"), props.get("tileheight"));
//         tileCount = new Vector2(props.get("width"), props.get("height"));
//         size = new Vector2(tileCount.x * tileSize.x, tileCount.y * tileSize.y);
//         // Spawn
//         if (props.hasProperty("spawn_x")) {
//             float spawn_x = props.get("spawn_x") * tileSize.x;
//             if (spawn == null)
//                 spawn = new Vector2(spawn_x, 0);
//             else
//                 spawn.x = spawn_x;
//         }
//         if (props.hasProperty("spawn_y")) {
//             float spawn_y = (tileCount.y - props.get("spawn_y")) * tileSize.y;
//             if (spawn == null)
//                 spawn = new Vector2(0, spawn_y);
//             else
//                 spawn.y = spawn_y;
//         }
//         if (props.hasProperty("gravity"))
//             gravity = props.get("gravity");
//         else
//             gravity = 100.f;
//         if (props.hasProperty("velocity"))
//             velocity = props.get("velocity");
//         else
//             velocity = 300;
// 
//         fixedCamera = props.hasProperty("fixed_camera");
//     }
// 
//     private void checkEssentialValues() throws Exception {
//         if (spawn == null)
//             throw new Exception("spawn_x and/or spawn_y are missing, they should be properties of a layer");
//     }
// 
// }


// Path: core/src/com/alexaut/kroniax/game/player/Player.java
import com.alexaut.kroniax.game.level.LevelProperties;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.math.Vector2;

package com.alexaut.kroniax.game.player;


public class Player {

    private Vector2 mPosition;
    private Vector2 mSize;

    private Vector2 mVelocity;
    private float mGravity;

    private PlayerShip mShip;
    private PlayerScriptTimer mScriptTimers;

    private Vector2 mCachePosition;
    private Vector2 mCacheSize;
    private Vector2 mCacheVelocity;
    private float mCacheGravity;


    public Player(LevelProperties props) {
