using Otter;
using PenniesAreGold.player;
using PenniesAreGold.ui;
using PenniesAreGold.Utility;

namespace PenniesAreGold
{
    class Global
    {
        public static Game GAME = null;
        public static Session PlayerSession;
        public static Player player = null;

        public const int MW = 1440 * 2;
        public const int MH = 960 * 2;

        public const int GRID_WIDTH = 32;
        public const int GRID_HEIGHT = 32;

        public static Camera cam = new Camera(0,0);
        //player values!
        public static float PlayerX = 0.0f;
        public static float PlayerY = 0.0f;
        public static int PlayerHealth = 300;
        public static Speed PlayerSpeed = new Speed(300);//was 300 testing
        //extras
        public static float troopSpeed = 1f;
        public static int TroopBuildingCost= 5;
        public static float enemyBulletSpeed = 1f;
        public static float troopBulletSpeed = 1f;
        //main values
        public static int numberOfCoins = 0;
        public static int totalNumberOfCoins = 0;
        public static int kills = 0;
        public static long Score = 0;

        public enum Type
        {
            PLAYER,
            SOLID,
            PENNY,
            MININGFACILITY,
            MININGBUTTON,
            NUMBERS,
            TROOPBUILDING,
            TROOPBUTTON,
            TROOP,
            ENEMYTROOP,
            BULLET,
            TROOPBULLET,
            ENEMYTROOPBUILDING
        }

        public static void PlayTroopDeathSound()
        {
            var rand = Rand.Int(1, 7);
            if (rand == 1)
                SoundManager.PlayRequestedSound("_death1", .5f);
            if (rand == 2)
                SoundManager.PlayRequestedSound("_death2", .5f);
            if (rand == 3)
                SoundManager.PlayRequestedSound("_death3", .5f);
            if (rand == 4)
                SoundManager.PlayRequestedSound("_death4", .5f);
            if (rand == 5)
                SoundManager.PlayRequestedSound("_death5", .5f);
            if (rand == 6)
                SoundManager.PlayRequestedSound("_death6", .5f);
            if (rand == 7)
                SoundManager.PlayRequestedSound("_death7", .5f);
        }
    }
}
