using KellysMarvelousAdventure.entities;
using KellysMarvelousAdventure.utilities;
using Otter;

class Global
{
    public static Game GAME = null;
    public static Session PlayerSession;
    public static Session Player2Session;
    public static Player player = null;
    public static Oldman player2 = null;

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

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

    public static Camera cam = new Camera(0, 0);
    public static float PlayerX = 0.0f;
    public static float PlayerY = 0.0f;
    public static int PlayerHealth = 10;
    public static Speed PlayerSpeed = new Speed(300);//was 300 testing

    public static float Player2X = 0.0f;
    public static float Player2Y = 0.0f;
    public static int Player2Health = 300;
    public static Speed Player2Speed = new Speed(300);//was 300 testing

    public static bool isGirlSaidGadZooks = false;
    internal static bool isOldManActive = false;
    public static bool doesPlayerHaveWagon = false;
    public static float catSpeed = .3f;
    public static float catBulletSpeed = Rand.Float(2f, 3f);
    internal static int SpawnCatTimerMin = 700;//idk, to start
    internal static int SpawnCatTimerMax = 900;//idk, to start
    internal static int SpawnCatTimer = Rand.Int(SpawnCatTimerMin, SpawnCatTimerMax);//idk, to start
    public static int NumberOfShips = 12;

    public static int SapCollected = 0;
    public static int SapBombs = 0;
    public static int score = 0;
    public static int Clicks = 0;
    public static int kills = 0;
    public static int SapBar = 1;//how many you need to get a segment in the sap bar.
    public static int Increaser = 100;
    public static bool once = true;

    //remember to include this in the Scene, it won't run without it!!
    public static void RunClicks()
    {
        //System.Console.WriteLine("sapbombs: {0} sapCollected: {1} sapbar: {2} increaser: {3} once: {4}", Global.SapBombs, Global.SapCollected, Global.SapBar, Global.Increaser, Global.once);
        if (Clicks >= SapBar && once)
        {//the decreases should only happen on a fill, not while filling.
            once = false;
            SapCollected += Increaser;
        }
    }

    public enum Type
    {
        PLAYER,
        SOLID,
        NUMBERS,
        CLICKYTREE,
        OLDMAN,
        DOOR,
        INSIDEDOOR,
        WAGON,
        BLUECAT,
        BULLET,
        DEFLECTEDBULLET,
        CATSHIPSPAWNER,
        STAIRS,
        SAPPEXPLOSION
    }
}
